|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A map that functions as an asymetric bi-directional map of non-null keys and values. Efficiently maps a key (Object) to one value (Object), and a value to a set (Set) of one or more keys. The identity (equals(), hashCode()) of a bimap is that of its key-to-value map store. Unlike a Map, all views are immutable unless otherwise noted by a specific implementation.
Todo: Refactor so that entrySet() works according to Map, and null keys and values are allowed.
Nested Class Summary |
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Method Summary | |
java.util.Set |
entrySet()
Gets an immutable view of the key-value entries (Map.Entry) in this bimap. |
Bimap |
getBimap()
Gets a singleton immutable view of this bimap. |
java.util.Set |
getKeys(java.lang.Object value)
Gets an immutable snapshot of the keys associated with a value. |
java.util.Set |
keySet()
Gets an immutable view of the keys (Object) in this bimap. |
void |
removeAllKeys(java.util.Collection keys)
Removes all the keys and their associated values. |
void |
removeAllValues(java.util.Collection values)
Removes all the values and their associated keys. |
void |
removeKey(java.lang.Object key)
Removes the key and its associated value. |
void |
removeValue(java.lang.Object value)
Removes the value and its associated keys. |
java.util.Collection |
values()
Gets an immutable view of the values (Object) in this bimap. |
java.util.Set |
valueSet()
Gets an immutable view of the values (Object) in this bimap as a set. |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
Method Detail |
public void removeValue(java.lang.Object value)
public void removeAllValues(java.util.Collection values)
public void removeKey(java.lang.Object key)
public void removeAllKeys(java.util.Collection keys)
public java.util.Set getKeys(java.lang.Object value)
public java.util.Set valueSet()
public Bimap getBimap()
public java.util.Set entrySet()
entrySet
in interface java.util.Map
public java.util.Set keySet()
keySet
in interface java.util.Map
public java.util.Collection values()
values
in interface java.util.Map
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |