java.lang.Object | +--org.apache.commons.collections.bidimap.AbstractDualBidiMap | +--org.apache.commons.collections.bidimap.DualTreeBidiMapAll Implemented Interfaces:
Comparator | The comparator to use |
Creates an empty DualTreeBidiMap |
DualTreeBidiMap(Map map) Constructs a DualTreeBidiMap and copies the mappings from specified Map. |
DualTreeBidiMap(Comparator comparator) Constructs a DualTreeBidiMap using the specified Comparator. |
DualTreeBidiMap(Map normalMap, Map reverseMap, BidiMap inverseBidiMap) Constructs a HashBidiMap that decorates the specified maps. |
Comparator | |
createBidiMap(Map normalMap, Map reverseMap, BidiMap inverseMap) Creates a new instance of this object. | |
Map | Creates a new instance of the map used by the subclass to store data. |
Object | firstKey() |
SortedMap | headMap(Object toKey) |
Object | lastKey() |
Object | nextKey(Object key) |
Obtains an ordered map iterator. | |
Object | previousKey(Object key) |
SortedMap | subMap(Object fromKey, Object toKey) |
SortedMap | tailMap(Object fromKey) |
protected final Comparator comparator
public DualTreeBidiMap()
DualTreeBidiMap
public DualTreeBidiMap(Comparator comparator)
DualTreeBidiMap
using the specified Comparator.
protected DualTreeBidiMap(Map normalMap, Map reverseMap, BidiMap inverseBidiMap)
HashBidiMap
that decorates the specified maps.
public DualTreeBidiMap(Map map)
DualTreeBidiMap
and copies the mappings from
specified Map
.
public Comparator comparator()
protected BidiMap createBidiMap(Map normalMap, Map reverseMap, BidiMap inverseMap)
protected Map createMap()
public Object firstKey()
public SortedMap headMap(Object toKey)
public OrderedBidiMap inverseOrderedBidiMap()
public SortedBidiMap inverseSortedBidiMap()
public Object lastKey()
public Object nextKey(Object key)
public OrderedMapIterator orderedMapIterator()
public Object previousKey(Object key)
public SortedMap subMap(Object fromKey, Object toKey)
public SortedMap tailMap(Object fromKey)
BidiMap
that uses twoTreeMap
instances. The setValue() method on iterators will succeed only if the new value being set is not already in the bidimap. When considering whether to use this class, the TreeBidiMap class should also be considered. It implements the interface using a dedicated design, and does not store each object twice, which can save on memory use.