|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.tool.configurator.TwoWayMapping
TwoWayMapping is a convenience class that allows bidirectional lookup between unique pairs of values. It is essentially a hashtable that can be searched using either keys or values. The semantics for this class only hold if no object exists as both a key and a value (unless they are a unique pair).
Constructor Summary | |
TwoWayMapping()
Constructs a new TwoWayMapping |
Method Summary | |
java.lang.Object |
get(java.lang.Object key)
Attempts to retrieve the "other half" of a pair that is mapped to the supplied object. |
void |
put(java.lang.Object first,
java.lang.Object second)
Puts a pair of objects into the TwoWayMapping. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TwoWayMapping()
Method Detail |
public void put(java.lang.Object first, java.lang.Object second)
first.
- The first object in the pair.second.
- The second object in the pair.public java.lang.Object get(java.lang.Object key)
key.
- One half of a pair.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |