Class ArrayMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
tools.ArrayMap<K,V>
Type Parameters:
K - The type of the keys.
V - The type of the values.
All Implemented Interfaces:
Serializable, Map<K,V>

public class ArrayMap<K,V> extends AbstractMap<K,V> implements Serializable
Provides a strongly-typed map of keys to values.
Since:
Revision 589
See Also:
  • Field Details

  • Constructor Details

    • ArrayMap

      public ArrayMap()
      Class constructor
    • ArrayMap

      public ArrayMap(Map<K,V> map)
      Class constructor.
      Parameters:
      map - The java.util.Map containing keys and values to import.
    • ArrayMap

      public ArrayMap(int initialCapacity)
      Class constructor.
      Parameters:
      initialCapacity - The initial size of the ArrayMap.
  • Method Details

    • entrySet

      public Set<Map.Entry<K,V>> entrySet()
      Returns a set of entries in this ArrayList.
      Specified by:
      entrySet in interface Map<K,V>
      Specified by:
      entrySet in class AbstractMap<K,V>
      Returns:
      The entries in a java.util.Set instance.
    • put

      public V put(K key, V value)
      Puts a key/value pair into the ArrayMap.
      Specified by:
      put in interface Map<K,V>
      Overrides:
      put in class AbstractMap<K,V>
      Parameters:
      key - The key of value
      value - The value to insert into the ArrayMap.
      Returns:
      null if no entry was replaced, the value replaced otherwise.