java.lang.Object | +--org.apache.commons.collections.bidimap.AbstractDualBidiMapAll Implemented Interfaces:
DualHashBidiMap
DualTreeBidiMap
transient Set | View of the entries. |
transient BidiMap | Inverse view of this map. |
transient Set | View of the keys. |
transient Map[] | Delegate map array. |
transient Collection | View of the values. |
Creates an empty map, initialised by createMap. |
AbstractDualBidiMap(Map normalMap, Map reverseMap, BidiMap inverseBidiMap) Constructs a map that decorates the specified maps, used by the subclass createBidiMap implementation. |
void | clear() |
boolean | containsKey(Object key) |
boolean | containsValue(Object value) |
createBidiMap(Map normalMap, Map reverseMap, BidiMap inverseMap) Creates a new instance of the subclass. | |
Iterator | createEntrySetIterator(Iterator iterator) Creates an entry set iterator. |
Iterator | createKeySetIterator(Iterator iterator) Creates a key set iterator. |
Map | Creates a new instance of the map used by the subclass to store data. |
Iterator | createValuesIterator(Iterator iterator) Creates a values iterator. |
Set | entrySet() Gets an entrySet view of the map. |
boolean | equals(Object obj) |
Object | get(Object key) |
Object | getKey(Object value) |
int | hashCode() |
boolean | isEmpty() |
Set | keySet() Gets a keySet view of the map. |
Obtains a MapIterator over the map. | |
Object | put(Object key, Object value) |
void | putAll(Map map) |
Object | remove(Object key) |
Object | removeValue(Object value) |
int | size() |
String | toString() |
Collection | values() Gets a values view of the map. |
protected transient Set entrySet
protected transient BidiMap inverseBidiMap
protected transient Set keySet
protected final transient Map[] maps
protected transient Collection values
protected AbstractDualBidiMap()
createMap
.
The map array must be populated by the subclass.
protected AbstractDualBidiMap(Map normalMap, Map reverseMap, BidiMap inverseBidiMap)
createBidiMap
implementation.
public void clear()
public boolean containsKey(Object key)
public boolean containsValue(Object value)
protected BidiMap createBidiMap(Map normalMap, Map reverseMap, BidiMap inverseMap)
protected Iterator createEntrySetIterator(Iterator iterator)
protected Iterator createKeySetIterator(Iterator iterator)
protected Map createMap()
protected Iterator createValuesIterator(Iterator iterator)
public Set entrySet()
public boolean equals(Object obj)
public Object get(Object key)
public Object getKey(Object value)
public int hashCode()
public BidiMap inverseBidiMap()
public boolean isEmpty()
public Set keySet()
public MapIterator mapIterator()
MapIterator
over the map.
The iterator implements ResetableMapIterator
.
This implementation relies on the entrySet iterator.
The setValue() methods only allow a new value to be set.
If the value being set is already in the map, an IllegalArgumentException
is thrown (as setValue cannot change the size of the map).
public Object put(Object key, Object value)
public void putAll(Map map)
public Object remove(Object key)
public Object removeValue(Object value)
public int size()
public String toString()
public Collection values()
BidiMap
implemented using two maps. An implementation can be written simply by implementing thecreateMap
method.