Class IdHashMap<V>
- Type Parameters:
V- the value type
- All Implemented Interfaces:
Serializable, Cloneable, Map<Id,V>, SequencedMap<Id, V>
A
LinkedHashMap whose keys are hardened to
org.osid.id.Id. It adds no behavior beyond fixing the
key type; all map operations are inherited.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an emptyHashMapwith the default initial capacity (16) and the default load factor (0.75).IdHashMap(int initialCapacity) Constructs an emptyHashMapwith the specified initial capacity and the default load factor (0.75).IdHashMap(int initialCapacity, float loadFactor) Constructs an emptyHashMapwith the specified initial capacity and load factor. -
Method Summary
Methods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
IdHashMap
public IdHashMap(int initialCapacity, float loadFactor) Constructs an emptyHashMapwith the specified initial capacity and load factor.- Parameters:
initialCapacity- the initial capacityloadFactor- the load factor- Throws:
IllegalArgumentException- if the initial capacity is negative or the load factor is nonpositive
-
IdHashMap
public IdHashMap(int initialCapacity) Constructs an emptyHashMapwith the specified initial capacity and the default load factor (0.75).- Parameters:
initialCapacity- the initial capacity.- Throws:
IllegalArgumentException- if the initial capacity is negative.
-
IdHashMap
public IdHashMap()Constructs an emptyHashMapwith the default initial capacity (16) and the default load factor (0.75).
-