public class TwoWayMultiCollection extends MultiCollection
| Modifier and Type | Field and Description |
|---|---|
protected TwoWayMultiCollection |
reverse
The reverse multi-collection.
|
map, type| Modifier | Constructor and Description |
|---|---|
|
TwoWayMultiCollection()
Create a two way map.
|
protected |
TwoWayMultiCollection(TwoWayMultiCollection reverse)
internal constrcutor for connecting two
two-way multi-collection.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
_add(java.lang.Object key,
java.lang.Object value)
Internal put method, which doesn't affect the reverse collection.
|
protected void |
_clear()
Internal clear method, which doesn't affect the reverse collection.
|
protected java.lang.Object |
_remove(java.lang.Object key)
Internal remove method, which doesn't affect the reverse collection.
|
protected void |
_remove(java.lang.Object key,
java.lang.Object value)
Internal remove method, which doesn't affect the reverse collection.
|
java.util.Collection<java.lang.Object> |
add(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map
(optional operation).
|
void |
clear()
Removes all mappings from this map.
|
TwoWayMultiCollection |
getReverseMultiCollection()
Get the reverse multi-collection.
|
java.util.Collection<java.lang.Object> |
remove(java.lang.Object key)
Removes the mapping for this key from this map if it is present.
|
void |
removeObject(java.lang.Object key,
java.lang.Object value)
Remove a special object from the
collection of a defined key.
|
add, addAll, clone, containsKey, containsValue, createCollection, entrySet, equals, get, getCollection, getKeys, getKeys, getObject, getObjects, getObjects, hashCode, isEmpty, keySet, put, putAll, size, toString, valuesprotected TwoWayMultiCollection reverse
public TwoWayMultiCollection()
protected TwoWayMultiCollection(TwoWayMultiCollection reverse)
public TwoWayMultiCollection getReverseMultiCollection()
public java.util.Collection<java.lang.Object> add(java.lang.Object key,
java.lang.Object value)
m.containsKey(k) would return
true.))add in class MultiCollectionkey - key with which the specified value is to be associated.value - value to be associated with the specified key.java.lang.UnsupportedOperationException - if the put operation is
not supported by this map.java.lang.ClassCastException - if the class of the specified key or value
prevents it from being stored in this map.java.lang.IllegalArgumentException - if some aspect of this key or value
prevents it from being stored in this map.java.lang.NullPointerException - this map does not permit null
keys or values, and the specified key or value is
null.protected java.lang.Object _add(java.lang.Object key,
java.lang.Object value)
public void clear()
clear in interface java.util.Mapclear in class MultiCollectionprotected void _clear()
public java.util.Collection<java.lang.Object> remove(java.lang.Object key)
(key==null ? k==null : key.equals(k)), that mapping
is removed. (The map can contain at most one such mapping.)
Returns the value to which the map previously associated the key, or null if the map contained no mapping for this key. (A null return can also indicate that the map previously associated null with the specified key if the implementation supports null values.) The map will not contain a mapping for the specified key once the call returns.
remove in interface java.util.Mapremove in class MultiCollectionkey - key whose mapping is to be removed from the map.java.lang.ClassCastException - if the key is of an inappropriate type for
this map (optional).java.lang.NullPointerException - if the key is null and this map
does not not permit null keys (optional).protected java.lang.Object _remove(java.lang.Object key)
public void removeObject(java.lang.Object key,
java.lang.Object value)
removeObject in class MultiCollectionprotected void _remove(java.lang.Object key,
java.lang.Object value)