Top Description Classes
[default module]

Package org.apache.commons.collections4.map


This package contains implementations of the Map, IterableMap, OrderedMap and SortedMap interfaces. A Map provides a lookup from a key to a value. A number of implementations also support the new MapIterator interface that enables simple iteration of map keys and values.

The following implementations are provided:

The following decorators are provided:

Class Summary

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

An abstract implementation of a hash-based map which provides numerous points for subclasses to override.

pack-priv abstract class
AbstractInputCheckedMapDecorator<K, V>

An abstract base class that simplifies the task of creating map decorators.

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

Provide a basic IterableMap implementation.

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

An abstract implementation of a hash-based map that links entries to create an ordered map and which provides numerous points for subclasses to override.

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

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

public abstract class
AbstractOrderedMapDecorator<
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 OrderedMap via decoration.

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

An abstract implementation of a hash-based map that allows the entries to be removed by the garbage collector.

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

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

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

A case-insensitive Map.

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

Decorates a map of other maps to provide a single unified view.

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

Decorates another Map returning a default value if the map does not contain the requested key.

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

Adapts a Map entrySet to the MapIterator interface.

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

Decorates another Map to fix the size, preventing add/remove.

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

Decorates another SortedMap to fix the size blocking add/remove.

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

A Map implementation that stores data in simple fields until the size is greater than 3.

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

A Map implementation that is a general purpose alternative to HashMap.

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

Decorates another Map to create objects in the map on demand.

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

Decorates another SortedMap to create objects in the map on demand.

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

A Map implementation that maintains the order of the entries.

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

Decorates a Map to ensure that the order of addition is retained using a List to maintain order.

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

A Map implementation with a fixed maximum size which removes the least recently used entry if an entry is added when full.

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

A Map implementation that uses multiple keys to map the value.

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

Deprecated since 4.1, use MultiValuedMap instead
A MultiValueMap decorates another map, allowing it to have more than one value for a key.
public class
PassiveExpiringMap<
the type of the keys in this map
K
,
the type of the values in this map
V
>

Decorates a Map to evict expired entries once their expiration time has been reached.

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

Decorates another Map to validate that additions match a specified predicate.

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

Decorates another SortedMap to validate that additions match a specified predicate.

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

A Map implementation that allows mappings to be removed by the garbage collector and matches keys and values based on == not equals().

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

A Map implementation that allows mappings to be removed by the garbage collector.

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

A Map implementation that holds a single item and is fixed size.

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

A StaticBucketMap is an efficient, thread-safe implementation of java.util.Map that performs well in in a highly thread-contentious environment.

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

Decorates another Map to transform objects that are added.

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

Decorates another SortedMap to transform objects that are added.

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

Decorates a map entry Set to ensure it can't be altered.

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

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

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

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

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

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