BidiMap implemented using two maps.
An implementation can be written simply by implementing the
createBidiMap(Map, Map, BidiMap) method.
DualHashBidiMap, DualTreeBidiMap
| Modifier and Type | Class and Description |
|---|---|
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class | |
| protected abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient Set | entrySet
View of the entries. |
| pack-priv transient BidiMap | inverseBidiMap
Inverse view of this map. |
| pack-priv transient Set | keySet
View of the keys. |
| pack-priv transient Map | normalMap
Normal delegate map. |
| pack-priv transient Map | reverseMap
Reverse delegate map. |
| pack-priv transient Set | values
View of the values. |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractDualBidiMap(final Map<K, V>
the normal direction map normalMap, final Map<V, K> the reverse direction map reverseMap)Creates an empty map using the two maps specified as storage. |
| protected | AbstractDualBidiMap(final Map<K, V>
the normal direction map normalMap, final Map<V, K> the reverse direction map reverseMap, final BidiMap<V, K> the inverse BidiMap inverseBidiMap)Constructs a map that decorates the specified maps,
used by the subclass |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements java. |
| public boolean | containsKey(final Object
key whose presence in this map is to be tested key)Implements java. true if this map contains a mapping for the specified
key.
|
| public boolean | containsValue(final Object
value whose presence in this map is to be tested value)Implements java. true if this map maps one or more keys to the
specified value.
|
| protected abstract BidiMap | Returns: the inverse mapthe normal direction map normalMap, Map<K, V> the reverse direction map reverseMap, BidiMap<K, V> this map, which is the inverse in the new map inverseMap)Creates a new instance of the subclass. |
| protected Iterator | Returns: the entrySet iteratorthe iterator to decorate iteratorCreates an entry set iterator. |
| protected Iterator | Returns: the keySet iteratorthe iterator to decorate iterator)Creates a key set iterator. |
| protected Iterator | Returns: the values iteratorthe iterator to decorate iterator)Creates a values iterator. |
| public Set | Returns: the entrySet viewImplements java. |
| public boolean | equals(final Object
object to be compared for equality with this map obj)Overrides java. Implements java. |
| public V | get(final Object
the key whose associated value is to be returned key)Implements java. null if this map contains no mapping for the key.
|
| public K | getKey(final Object
the value to find the key for value)Implements org. |
| public int | hashCode()
Overrides java. Implements java. |
| public BidiMap | inverseBidiMap()
Implements org. |
| public boolean | isEmpty()
Implements java. true if this map contains no key-value mappings.
|
| public Set | Returns: the keySet viewImplements java. |
| public MapIterator | Returns: a map iteratorImplements org. MapIterator over the map.
|
| public V | put(final K
the key to store key, final V the value to store value)Implements org. |
| public void | putAll(final Map<? extends K, ? extends V>
mappings to be stored in this map map)Implements java. |
| public V | remove(final Object
key whose mapping is to be removed from the map key)Implements java. |
| public K | removeValue(final Object
the value to find the key-value pair for value)Implements org. |
| public int | size()
Implements java. |
| public String | |
| public Set | Returns: the values viewImplements org. |