Class ArrayMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- net.ontopia.topicmaps.query.utils.ArrayMap<K,V>
-
- All Implemented Interfaces:
Map<K,V>
public class ArrayMap<K,V> extends AbstractMap<K,V>
INTERNAL: Immutable Map implementation that stores its keys and values in two arrays. Note that the implementation is immutable in that you cannot modify it using the public Map interface. You can modify it by modifying the underlying arrays.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
boolean
equals(Object o)
V
get(Object key)
Object[]
getKeys()
V[]
getValues()
boolean
isEmpty()
Set<K>
keySet()
V
remove(Object key)
void
setKeys(K[] keys)
void
setValues(V[] values)
int
size()
Collection<V>
values()
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
getKeys
public Object[] getKeys()
-
setKeys
public void setKeys(K[] keys)
-
getValues
public V[] getValues()
-
setValues
public void setValues(V[] values)
-
size
public int size()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
- Overrides:
containsKey
in classAbstractMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
- Overrides:
containsValue
in classAbstractMap<K,V>
-
equals
public boolean equals(Object o)
-
isEmpty
public boolean isEmpty()
-
values
public Collection<V> values()
-
clear
public void clear()
-
-