|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecp.common.BidirectionalMap<K,V>
K
- the type of the keyV
- the type of the valuepublic class BidirectionalMap<K,V>
Convenience class for mapping keys to values and vice versa. Both, keys and values, have to be unique.
Constructor Summary | |
---|---|
BidirectionalMap()
Default constructor. |
Method Summary | |
---|---|
K |
getByValue(V value)
Returns the key belonging to the given value. |
V |
getValue(K key)
Returns the value belonging to the given key. |
Set<K> |
keys()
Returns all keys. |
void |
put(K key,
V value)
Associates the specified value with the specified key in this map and vice versa. |
V |
removeByKey(K key)
Removes the bidirectional mapping for the given key. |
K |
removeByValue(V value)
Removes the bidirectional mapping for the given value. |
Set<V> |
values()
Returns all values. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BidirectionalMap()
Method Detail |
---|
public void put(K key, V value)
key
- the keyvalue
- the valuepublic V removeByKey(K key)
key
- the key to be removed
public K removeByValue(V value)
value
- the value to be removed
public V getValue(K key)
key
- the key whose value should be looked up
public K getByValue(V value)
value
- the key whose value should be looked up
public Set<K> keys()
public Set<V> values()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |