net.ontopia.topicmaps.query.utils
Class ArrayMap
java.lang.Object
java.util.AbstractMap
net.ontopia.topicmaps.query.utils.ArrayMap
- All Implemented Interfaces:
- java.util.Map
public class ArrayMap
- extends java.util.AbstractMap
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 classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Field Summary |
protected java.lang.Object[] |
keys
|
protected int |
size
|
protected java.lang.Object[] |
values
|
Constructor Summary |
ArrayMap(java.lang.Object[] keys)
|
ArrayMap(java.lang.Object[] keys,
java.lang.Object[] values)
|
Methods inherited from class java.util.AbstractMap |
clone, hashCode, put, putAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
keys
protected java.lang.Object[] keys
values
protected java.lang.Object[] values
size
protected int size
ArrayMap
public ArrayMap(java.lang.Object[] keys)
ArrayMap
public ArrayMap(java.lang.Object[] keys,
java.lang.Object[] values)
getKeys
public java.lang.Object[] getKeys()
setKeys
public void setKeys(java.lang.Object[] keys)
getValues
public java.lang.Object[] getValues()
setValues
public void setValues(java.lang.Object[] values)
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map
- Overrides:
get
in class java.util.AbstractMap
size
public int size()
- Specified by:
size
in interface java.util.Map
- Overrides:
size
in class java.util.AbstractMap
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map
- Overrides:
containsKey
in class java.util.AbstractMap
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map
- Overrides:
containsValue
in class java.util.AbstractMap
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interface java.util.Map
- Overrides:
equals
in class java.util.AbstractMap
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map
- Overrides:
isEmpty
in class java.util.AbstractMap
keySet
public java.util.Set keySet()
- Specified by:
keySet
in interface java.util.Map
- Overrides:
keySet
in class java.util.AbstractMap
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interface java.util.Map
- Specified by:
entrySet
in class java.util.AbstractMap
values
public java.util.Collection values()
- Specified by:
values
in interface java.util.Map
- Overrides:
values
in class java.util.AbstractMap
clear
public void clear()
- Specified by:
clear
in interface java.util.Map
- Overrides:
clear
in class java.util.AbstractMap
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map
- Overrides:
remove
in class java.util.AbstractMap
Copyright © 2000-2012 Ontopia.