Class IdHashMap<V>

java.lang.Object
java.util.AbstractMap<Id,V>
java.util.HashMap<Id,V>
java.util.LinkedHashMap<Id,V>
net.okapia.osid.torrefacto.collect.IdHashMap<V>
Type Parameters:
V - the value type
All Implemented Interfaces:
Serializable, Cloneable, Map<Id,V>, SequencedMap<Id,V>

public class IdHashMap<V> extends LinkedHashMap<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:
  • Constructor Details

    • IdHashMap

      public IdHashMap(int initialCapacity, float loadFactor)
      Constructs an empty HashMap with the specified initial capacity and load factor.
      Parameters:
      initialCapacity - the initial capacity
      loadFactor - the load factor
      Throws:
      IllegalArgumentException - if the initial capacity is negative or the load factor is nonpositive
    • IdHashMap

      public IdHashMap(int initialCapacity)
      Constructs an empty HashMap with 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 empty HashMap with the default initial capacity (16) and the default load factor (0.75).