Class DualTreeBidiMap<K,V>

Type Parameters:
K - the type of the keys in this map
V - the type of the values in this map
All Implemented Interfaces:
Serializable, Map<K,V>, SortedMap<K,V>, BidiMap<K,V>, Get<K,V>, IterableGet<K,V>, IterableMap<K,V>, OrderedBidiMap<K,V>, OrderedMap<K,V>, Put<K,V>, SortedBidiMap<K,V>

public class DualTreeBidiMap<K,V> extends AbstractDualBidiMap<K,V> implements SortedBidiMap<K,V>, Serializable
Implementation of BidiMap that uses two TreeMap instances.

The setValue() method on iterators will succeed only if the new value being set is not already in the bidi map.

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.

NOTE: From Commons Collections 3.1, all subclasses will use TreeMap and the flawed createMap method is ignored.

See Also: