|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openquark.cal.util.ArrayMap<K,V>
public final class ArrayMap<K,V>
A map whose elements are ordered by the insertion order of elements in the map. This class allows both O(1) map lookup (like HashMap) and O(1) indexing (like ArrayList).
The SequencedHashMap at http://jakarta.apache.org/commons/collections/ provides a similar interface but doesn't support O(1) integer indexing.
The LinkedHashMap of jdk 1.4 is almost as good, but we want to be able to conveniently define a type safe iterator and we don't need to be able to remove elements from the map, so that this class does the job.
Creation date (Nov 6, 2002).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
ArrayMap()
|
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<K,V>> |
entrySet()
|
V |
get(Object key)
|
K |
getNthKey(int index)
|
V |
getNthValue(int index)
|
boolean |
isEmpty()
|
Set<K> |
keySet()
|
V |
put(K key,
V value)
Adds the (key, value) pair to the map, provided that the map doesn't already contain the key. |
void |
putAll(Map<? extends K,? extends V> t)
|
V |
remove(Object key)
|
int |
size()
|
String |
toString()
|
Collection<V> |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public ArrayMap()
| Method Detail |
|---|
public V put(K key,
V value)
put in interface Map<K,V>key - value -
NullPointerException - if either argument is null.
public V get(Object key)
get in interface Map<K,V>public K getNthKey(int index)
public V getNthValue(int index)
public int size()
size in interface Map<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>public String toString()
toString in class Objectpublic void clear()
clear in interface Map<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public Collection<V> values()
values in interface Map<K,V>public void putAll(Map<? extends K,? extends V> t)
putAll in interface Map<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>public Set<K> keySet()
keySet in interface Map<K,V>public V remove(Object key)
remove in interface Map<K,V>
|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||