|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.virtualweaver.xotics.datamodel.datatype.XdtBidiMap
A bidirectional map class, where a key and a value can be stored, but where key can serve to
retrieve value, and value can serve to retrieve key. Rather than using 'key' and 'value' terms,
here we use 'start' and 'end' terms : if a couple (start, end) is stored via
a put*()
method, then end value can be got by getForward(Object)
with start as param, and start value can be got by getReverse(Object)
with end as param.
Constructor Summary | |
XdtBidiMap()
|
Method Summary | |
java.lang.Object |
clone()
|
boolean |
containsForwardKey(java.lang.Object start)
Returns true if param start exists |
boolean |
containsReverseKey(java.lang.Object end)
Returns true if param end exists |
java.util.Set |
forwardKeySet()
Returns the list of start values |
java.lang.Object |
getForward(java.lang.Object start)
Returns end value giving start value |
java.lang.Object |
getReverse(java.lang.Object end)
Returns start value giving end value |
void |
putAll(XdtBidiMap extm)
Integrates all content of param extm |
void |
putForward(java.lang.Object start,
java.lang.Object end)
Stores a couple of values. |
void |
putReverse(java.lang.Object end,
java.lang.Object start)
Stores a couple of values. |
java.lang.Object |
removeForward(java.lang.Object start)
Removes (start, end) mapping by giving start value |
java.lang.Object |
removeReverse(java.lang.Object end)
Removes (start, end) mapping by giving end value |
java.util.Set |
reverseKeySet()
Returns the list of end values |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XdtBidiMap()
Method Detail |
public void putForward(java.lang.Object start, java.lang.Object end)
start
- start valueend
- end valuepublic void putReverse(java.lang.Object end, java.lang.Object start)
end
- end valuestart
- start valuepublic java.lang.Object getForward(java.lang.Object start)
start
- start value
public java.lang.Object getReverse(java.lang.Object end)
end
- end value
public java.lang.Object removeForward(java.lang.Object start)
start
- start value of couple to remove
public java.lang.Object removeReverse(java.lang.Object end)
end
- end value of couple to remove
public boolean containsForwardKey(java.lang.Object start)
start
exists
start
- start value to search for
public boolean containsReverseKey(java.lang.Object end)
end
exists
end
- end value to search for
public java.util.Set forwardKeySet()
Set
containing all the start valuespublic java.util.Set reverseKeySet()
Set
containing all the end valuespublic void putAll(XdtBidiMap extm)
extm
extm
- external map whose content is to be integratedpublic java.lang.Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |