K
- type of the keyV
- type of the valuepublic class ArrayMap<K,V>
extends java.util.AbstractMap<K,V>
Constructor and Description |
---|
ArrayMap(K[] keys,
V[] values)
Creates new instance of this map given the list of keys and values.
|
ArrayMap(K[] keys,
V[] values,
boolean copyArrays)
Creates new instance of this map given the list of keys and values.
|
ArrayMap(java.util.Map<K,V> map)
Creates this fixed map given existing map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Implementation of this method is the only necessary to fulfill the AbstactMap contract.
|
V |
get(java.lang.Object key) |
java.util.Set<K> |
keySet() |
int |
size() |
public ArrayMap(K[] keys, V[] values)
keys
- list of keysvalues
- list of valuespublic ArrayMap(K[] keys, V[] values, boolean copyArrays)
keys
- list of keysvalues
- list of valuescopyArrays
- if true, the passed arrays are shallow copiedpublic java.util.Set<java.util.Map.Entry<K,V>> entrySet()
public java.util.Set<K> keySet()
public V get(java.lang.Object key)
public boolean containsKey(java.lang.Object key)