|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.bidimap.AbstractDualBidiMap<K,V>
org.apache.commons.collections4.bidimap.DualHashBidiMap<K,V>
public class DualHashBidiMap<K,V>
Implementation of BidiMap
that uses two HashMap
instances.
Two HashMap
instances are used in this class.
This provides fast lookups at the expense of storing two sets of map entries.
Commons Collections would welcome the addition of a direct hash-based
implementation of the BidiMap
interface.
NOTE: From Commons Collections 3.1, all subclasses will use HashMap
and the flawed createMap
method is ignored.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.collections4.bidimap.AbstractDualBidiMap |
---|
AbstractDualBidiMap.BidiMapIterator<K,V>, AbstractDualBidiMap.EntrySet<K,V>, AbstractDualBidiMap.EntrySetIterator<K,V>, AbstractDualBidiMap.KeySet<K>, AbstractDualBidiMap.KeySetIterator<K>, AbstractDualBidiMap.MapEntry<K,V>, AbstractDualBidiMap.Values<V>, AbstractDualBidiMap.ValuesIterator<V>, AbstractDualBidiMap.View<K,V,E> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
|
DualHashBidiMap()
Creates an empty HashBidiMap . |
|
DualHashBidiMap(Map<K,V> map)
Constructs a HashBidiMap and copies the mappings from
specified Map . |
protected |
DualHashBidiMap(Map<K,V> normalMap,
Map<V,K> reverseMap,
BidiMap<V,K> inverseBidiMap)
Constructs a HashBidiMap that decorates the specified maps. |
Method Summary | |
---|---|
protected BidiMap<V,K> |
createBidiMap(Map<V,K> normalMap,
Map<K,V> reverseMap,
BidiMap<K,V> inverseBidiMap)
Creates a new instance of this object. |
Methods inherited from class org.apache.commons.collections4.bidimap.AbstractDualBidiMap |
---|
clear, containsKey, containsValue, createEntrySetIterator, createKeySetIterator, createValuesIterator, entrySet, equals, get, getKey, hashCode, inverseBidiMap, isEmpty, keySet, mapIterator, put, putAll, remove, removeValue, size, toString, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DualHashBidiMap()
HashBidiMap
.
public DualHashBidiMap(Map<K,V> map)
HashBidiMap
and copies the mappings from
specified Map
.
map
- the map whose mappings are to be placed in this mapprotected DualHashBidiMap(Map<K,V> normalMap, Map<V,K> reverseMap, BidiMap<V,K> inverseBidiMap)
HashBidiMap
that decorates the specified maps.
normalMap
- the normal direction mapreverseMap
- the reverse direction mapinverseBidiMap
- the inverse BidiMapMethod Detail |
---|
protected BidiMap<V,K> createBidiMap(Map<V,K> normalMap, Map<K,V> reverseMap, BidiMap<K,V> inverseBidiMap)
createBidiMap
in class AbstractDualBidiMap<K,V>
normalMap
- the normal direction mapreverseMap
- the reverse direction mapinverseBidiMap
- the inverse BidiMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |