Package org.apache.commons.collections.bidimap
package org.apache.commons.collections.bidimap
This package contains implementations of the
BidiMap,
OrderedBidiMap and
SortedBidiMap interfaces.
A BidiMap is an extension to Map that allows keys and values to be looked up with equal ease.
One example usage is a system communicating to a legacy datasource that must convert codes
from the new format to the old format and vice versa.
The following implementations are provided in the package:
- DualHashBidiMap - uses two HashMaps to implement BidiMap
- DualTreeBidiMap - uses two TreeMaps to implement SortedBidiMap
- TreeBidiMap - red-black tree implementation of OrderedBidiMap
The following decorators are provided in the package:
- Unmodifiable - ensures the map cannot be altered
-
ClassesClassDescriptionProvides a base decorator that enables additional functionality to be added to a BidiMap via decoration.Abstract
BidiMapimplemented using two maps.Inner class MapIterator.Inner class EntrySet.Inner class EntrySetIterator.Inner class KeySet.Inner class KeySetIterator.Inner class MapEntry.Inner class Values.Inner class ValuesIterator.Inner class View.Provides a base decorator that enables additional functionality to be added to an OrderedBidiMap via decoration.Provides a base decorator that enables additional functionality to be added to a SortedBidiMap via decoration.Implementation ofBidiMapthat uses twoHashMapinstances.Implementation ofBidiMapthat uses twoTreeMapinstances.Inner class MapIterator.Internal sorted map view.Red-Black tree-based implementation of BidiMap where all objects added implement theComparableinterface.A view of this map.A node used to store the data.A node used to store the data.A view of this map.An iterator over the map.An iterator over the map.Decorates anotherBidiMapto ensure it can't be altered.Decorates anotherOrderedBidiMapto ensure it can't be altered.Decorates anotherSortedBidiMapto ensure it can't be altered.