Package gaiasky.util

Class TwoWayMap<K,V>

java.lang.Object
gaiasky.util.TwoWayMap<K,V>
Type Parameters:
K - Type of first object.
V - Type of second object.

public class TwoWayMap<K,V> extends Object
A map that allows forward and backward referencing. It is implemented by wrapping two hash maps and keeping them up to date.
  • Constructor Details

    • TwoWayMap

      public TwoWayMap()
  • Method Details

    • add

      public void add(K key, V value)
    • getForward

      public V getForward(K key)
    • getBackward

      public K getBackward(V key)
    • containsKey

      public boolean containsKey(K key)
    • containsValue

      public boolean containsValue(V value)
    • removeKey

      public void removeKey(K key)
    • removeValue

      public boolean removeValue(V value)