X
- Y
- public class TwoWayMap<X,Y> extends 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) |
Set<X> |
getXSet() |
Y |
getY(X x) |
Set<Y> |
getYSet() |
boolean |
isEmtpy() |
Y |
removeX(X x) |
X |
removeY(Y y) |
Iterator<X> |
xiterator() |
Iterator<Pair<X,Y>> |
xyiterator() |
Iterator<Y> |
yiterator() |
Copyright © 2015. All rights reserved.