Class TypeHashMap<V>
- Type Parameters:
V- the value type
- All Implemented Interfaces:
Serializable, Cloneable, Map<Type,V>, SequencedMap<Type, V>
A
LinkedHashMap whose keys are hardened to
org.osid.type.Type. 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).TypeHashMap(int initialCapacity) Constructs an emptyHashMapwith the specified initial capacity and the default load factor (0.75).TypeHashMap(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
-
TypeHashMap
public TypeHashMap(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
-
TypeHashMap
public TypeHashMap(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.
-
TypeHashMap
public TypeHashMap()Constructs an emptyHashMapwith the default initial capacity (16) and the default load factor (0.75).
-