net.ontopia.topicmaps.query.utils
Class ArrayMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by net.ontopia.topicmaps.query.utils.ArrayMap
All Implemented Interfaces:
Map

public class ArrayMap
extends 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 Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  Object[] keys
           
protected  int size
           
protected  Object[] values
           
 
Constructor Summary
ArrayMap(Object[] keys)
           
ArrayMap(Object[] keys, Object[] values)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 Object[] getKeys()
           
 Object[] getValues()
           
 boolean isEmpty()
           
 Set keySet()
           
 Object remove(Object key)
           
 void setKeys(Object[] keys)
           
 void setValues(Object[] values)
           
 int size()
           
 Collection 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
 

Field Detail

keys

protected Object[] keys

values

protected Object[] values

size

protected int size
Constructor Detail

ArrayMap

public ArrayMap(Object[] keys)

ArrayMap

public ArrayMap(Object[] keys,
                Object[] values)
Method Detail

getKeys

public Object[] getKeys()

setKeys

public void setKeys(Object[] keys)

getValues

public Object[] getValues()

setValues

public void setValues(Object[] values)

get

public Object get(Object key)
Specified by:
get in interface Map
Overrides:
get in class AbstractMap

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class AbstractMap

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map
Overrides:
containsKey in class AbstractMap

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map
Overrides:
containsValue in class AbstractMap

equals

public boolean equals(Object o)
Specified by:
equals in interface Map
Overrides:
equals in class AbstractMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class AbstractMap

keySet

public Set keySet()
Specified by:
keySet in interface Map
Overrides:
keySet in class AbstractMap

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Specified by:
entrySet in class AbstractMap

values

public Collection values()
Specified by:
values in interface Map
Overrides:
values in class AbstractMap

clear

public void clear()
Specified by:
clear in interface Map
Overrides:
clear in class AbstractMap

remove

public Object remove(Object key)
Specified by:
remove in interface Map
Overrides:
remove in class AbstractMap


Copyright © 2000-2012 Ontopia.