|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.util.MultiMap
public class MultiMap
Represents a Map that uses two keys.
For use in an environment where you want to cache symmetric sets of data
but with different top-level keys. e.g. cache the source lists from
two different databases.
| Constructor Summary | |
|---|---|
MultiMap()
Instantiates a MultiMap. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(Object tk,
Object key)
Determines whether or not it contains the specified key. |
Set |
entrySet(Object tk)
Returns the entry set for the specified "top" key. |
Object |
get(Object top_key,
Object key)
Returns the value for the key, using the specified "top" key. |
Map |
getMap(Object tk)
Returns the Map for the key. |
Set |
keySet(Object tk)
Returns the key set for the specified "top" key. |
void |
put(Object top_key,
Object key,
Object value)
Puts the key/value pair into the map using the specified "top" key. |
void |
remove(Object top_key,
Object key)
Removes the entry for the specified keys. |
void |
setMap(Object tk,
Map map)
Sets the Map for the key. |
Collection |
values(Object tk)
Returns the value for the specified "top" key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiMap()
MultiMap.
| Method Detail |
|---|
public void put(Object top_key,
Object key,
Object value)
top_key - the top keykey - the keyvalue - the value
public Object get(Object top_key,
Object key)
top_key - the top keykey - the key
public void remove(Object top_key,
Object key)
top_key - the top keykey - the keypublic Collection values(Object tk)
tk - the top key
public Set keySet(Object tk)
tk - the top key
public Set entrySet(Object tk)
tk - the top key
public boolean containsKey(Object tk,
Object key)
tk - the top keykey - the key to check
true if it contains the key;
false otherwise
public void setMap(Object tk,
Map map)
tk - the top keymap - the mappublic Map getMap(Object tk)
tk - the top key
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||