|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ed.inf.utils.maputils.OneToManyMap<T,U>
uk.ac.ed.inf.utils.maputils.IndexedOneToManyMap<T,U>
public class IndexedOneToManyMap<T,U>
A one-to-many map that uses an internal integer index to save memory. Useful, for example, for maps having few, long-string repeated values. Do not use if you need to add or remove individual objects. This map cannot take an empty or null string as key or value.
| Field Summary |
|---|
| Fields inherited from class uk.ac.ed.inf.utils.maputils.OneToManyMap |
|---|
m_map |
| Constructor Summary | |
|---|---|
IndexedOneToManyMap()
Initialise an empty map |
|
IndexedOneToManyMap(java.util.Vector<T> keys,
java.util.Vector<U> values)
Initialise with a list of key-value pairs |
|
| Method Summary | |
|---|---|
boolean |
containsKeyValue(T key,
U value)
Checks if the map contains a specific key-value pair |
boolean |
containsValue(U value)
Checks if the map contains a value |
java.util.Set<U> |
getAKeyValues(T key)
Get the set of unique values for this key. |
java.util.Set<U> |
getNonEmptyValues()
Get the set of unique, non-empty-string values for this map. |
java.util.Set<U> |
getValues()
Get the set of unique values for this map. |
void |
initialise()
public TreeMap |
| Methods inherited from class uk.ac.ed.inf.utils.maputils.OneToManyMap |
|---|
addAll, addKeyAndValue, containsKey, deleteKeyValue, getKeys, getKeysVectorValuesVector, getKeyValuesPairsSize, getMap, getNonEmptyKeys, getNonEmptyKeyValuesPairsSize, mapIsNullOrEmpty, size, toCSV, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IndexedOneToManyMap()
public IndexedOneToManyMap(java.util.Vector<T> keys,
java.util.Vector<U> values)
keys - the list of keysvalues - the list of values (the value for each key in the keys list)| Method Detail |
|---|
public boolean containsKeyValue(T key,
U value)
containsKeyValue in class OneToManyMap<T,U>key - value -
public boolean containsValue(U value)
containsValue in class OneToManyMap<T,U>value - a value
public java.util.Set<U> getAKeyValues(T key)
getAKeyValues in class OneToManyMap<T,U>public java.util.Set<U> getValues()
getValues in class OneToManyMap<T,U>public void initialise()
initialise in class OneToManyMap<T,U>public java.util.Set<U> getNonEmptyValues()
getNonEmptyValues in class OneToManyMap<T,U>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||