Package gaiasky.util
Class TwoWayHashmap<K,V>
java.lang.Object
gaiasky.util.TwoWayHashmap<K,V>
- Type Parameters:
K
- Key type in forward map, value in backward mapV
- Value type in forward map, key in backward map
public class TwoWayHashmap<K,V>
extends java.lang.Object
Simple two-way hashmap implemented with two maps.
-
Constructor Summary
Constructors Constructor Description TwoWayHashmap()
-
Method Summary
Modifier and Type Method Description void
add(K key, V value)
boolean
containsKey(K key)
boolean
containsValue(V value)
K
getBackward(V key)
V
getForward(K key)
boolean
removeKey(K key)
boolean
removeValue(V value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TwoWayHashmap
public TwoWayHashmap()
-
-
Method Details
-
add
-
getForward
-
getBackward
-
containsKey
-
containsValue
-
removeKey
-
removeValue
-