X
- Y
- public class TwoWayMap<X,Y>
extends java.lang.Object
A bi-directional map X <-> Y
. For lack of better terms
(yes, we considered "domain" and "range") the map is between a set of
Xs and a set of Ys.
Note that this class is not thread-safe.
Constructor and Description |
---|
TwoWayMap() |
Modifier and Type | Method and Description |
---|---|
void |
add(X x,
Y y) |
void |
clear() |
boolean |
containsX(X x) |
boolean |
containsY(Y y) |
X |
getX(Y y) |
java.util.Set<X> |
getXSet() |
Y |
getY(X x) |
java.util.Set<Y> |
getYSet() |
boolean |
isEmtpy() |
Y |
removeX(X x) |
X |
removeY(Y y) |
java.util.Iterator<X> |
xiterator() |
java.util.Iterator<Pair<X,Y>> |
xyiterator() |
java.util.Iterator<Y> |
yiterator() |
public java.util.Iterator<X> xiterator()
public java.util.Iterator<Y> yiterator()
public java.util.Set<Y> getYSet()
public java.util.Set<X> getXSet()
public boolean containsX(X x)
public boolean containsY(Y y)
public boolean isEmtpy()
public void clear()