|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.MultiMap<K,V>
K - KeyV - Valuepublic final class MultiMap<K,V>
MultiMap allows multiple keys with their values. It accepts null values as keys and values. (implemented as two array lists)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
MultiMap()
Constructor with 10 initial Capacity (same as ArrayList) |
|
MultiMap(int initialCapacity)
Constructor |
|
| Method Summary | |
|---|---|
void |
clear()
Clear content |
boolean |
containsKey(Object key)
Contains Key |
boolean |
containsValue(Object value)
Contains Value |
Set<Map.Entry<K,V>> |
entrySet()
Get entry set - not implemented |
boolean |
equals(Object o)
Equals - not implemented |
V |
get(Object key)
Return ArrayList of Values of Key |
ArrayList<K> |
getKeys(Object value)
Return ArrayList of Keys with Value |
ArrayList<V> |
getValues(Object key)
Return ArrayList of Values of Key |
boolean |
isEmpty()
Is Empty |
Set<K> |
keySet()
Return HashSet of Keys |
void |
printToLog()
dump all keys - values to log |
V |
put(K key,
V value)
Put Key & Value |
void |
putAll(Map<? extends K,? extends V> t)
Put all |
V |
remove(Object key)
Remove key |
int |
size()
Return number of elements |
String |
toString()
Returns class name and number of entries |
Collection<V> |
values()
Return Collection of values |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
hashCode |
| Constructor Detail |
|---|
public MultiMap()
public MultiMap(int initialCapacity)
initialCapacity - initial capacity| Method Detail |
|---|
public int size()
size in interface Map<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>key - test key
public boolean containsValue(Object value)
containsValue in interface Map<K,V>value - test value
public V get(Object key)
get in interface Map<K,V>key - key
public ArrayList<V> getValues(Object key)
key - key
public ArrayList<K> getKeys(Object value)
value - value
public V put(K key,
V value)
put in interface Map<K,V>key - value -
public V remove(Object key)
remove in interface Map<K,V>key - key
public void putAll(Map<? extends K,? extends V> t)
putAll in interface Map<K,V>t - public void clear()
clear in interface Map<K,V>public Set<K> keySet()
keySet in interface Map<K,V>public Collection<V> values()
values in interface Map<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>public boolean equals(Object o)
equals in interface Map<K,V>equals in class Objecto - test object
public String toString()
toString in class Objectpublic void printToLog()
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||