Top Description Classes
[default module]

Package org.apache.commons.collections4.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:

The following decorators are provided in the package:

Class Summary

Modifier and TypeClass and Description
public abstract class
AbstractBidiMapDecorator<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Provides a base decorator that enables additional functionality to be added to a BidiMap via decoration.

public abstract class
AbstractDualBidiMap<
the type of the keys in the map
K
,
the type of the values in the map
V
>

Abstract BidiMap implemented using two maps.

public abstract class
AbstractOrderedBidiMapDecorator<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Provides a base decorator that enables additional functionality to be added to an OrderedBidiMap via decoration.

public abstract class
AbstractSortedBidiMapDecorator<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Provides a base decorator that enables additional functionality to be added to a SortedBidiMap via decoration.

public class
DualHashBidiMap<
the type of the keys in the map
K
,
the type of the values in the map
V
>

Implementation of BidiMap that uses two HashMap instances.

public class
DualLinkedHashBidiMap<
the type of the keys in the map
K
,
the type of the values in the map
V
>

Implementation of BidiMap that uses two LinkedHashMap instances.

public class
DualTreeBidiMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Implementation of BidiMap that uses two TreeMap instances.

public class
TreeBidiMap<
the type of the keys in this map
K extends Comparable<K>
,
the type of the values in this map
V extends Comparable<V>
>

Red-Black tree-based implementation of BidiMap where all objects added implement the Comparable interface.

public class
UnmodifiableBidiMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Decorates another BidiMap to ensure it can't be altered.

public class
UnmodifiableOrderedBidiMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Decorates another OrderedBidiMap to ensure it can't be altered.

public class
UnmodifiableSortedBidiMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Decorates another SortedBidiMap to ensure it can't be altered.