Package org.apache.commons.collections.map
package org.apache.commons.collections.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:
- CaseInsensitiveMap - map that compares keys in a case insensitive way
- CompositeMap - map that combines multiple maps into a single view
- HashedMap - general purpose HashMap replacement supporting MapIterator
- IdentityMap - map that uses == for comparison instead of equals()
- Flat3Map - designed for good performance at size 3 or less
- LinkedMap - a hash map that maintains insertion order, supporting OrderedMapIterator
- MultiKeyMap - map that provides special methods for using more than one key to access the value
- ReferenceMap - allows the garbage collector to collect keys and values using equals() for comparison
- ReferenceIdentityMap - allows the garbage collector to collect keys and values using == for comparison
- SingletonMap - a fully featured map to hold one key-value pair
- StaticBucketMap - internally synchronized and designed for thread-contentious environments
The following decorators are provided:
- Unmodifiable - ensures the collection cannot be altered
- Predicated - ensures that only elements that are valid according to a predicate can be added
- Typed - ensures that only elements that are of a specific type can be added
- Transformed - transforms each element added
- FixedSize - ensures that the size of the map cannot change
- Lazy - creates objects in the map on demand
- ListOrdered - ensures that insertion order is retained
-
ClassDescriptionAn abstract implementation of a hash-based map which provides numerous points for subclasses to override.EntrySet implementation.EntrySet iterator.HashEntry used to store the data.Base IteratorMapIterator implementation.KeySet implementation.KeySet iterator.Values implementation.Values iterator.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.EntrySet iterator.KeySet iterator.LinkEntry that stores the data.Base Iterator that iterates in link order.MapIterator implementation.Values iterator.Provides a base decorator that enables additional functionality to be added to a Map via decoration.Provides a base decorator that enables additional functionality to be added to an OrderedMap via decoration.An abstract implementation of a hash-based map that allows the entries to be removed by the garbage collector.A MapEntry implementation for the map.Provides a base decorator that enables additional functionality to be added to a Map via decoration.A case-insensitive
Map.Decorates a map of other maps to provide a single unified view.This interface allows definition for all of the indeterminate mutators in a CompositeMap, as well as providing a hook for callbacks on key collisions.Decorates anotherMapreturning a default value if the map does not contain the requested key.Decorates anotherMapto fix the size, preventing add/remove.Decorates anotherSortedMapto fix the size blocking add/remove.AMapimplementation that stores data in simple fields until the size is greater than 3.AMapimplementation that is a general purpose alternative toHashMap.AMapimplementation that matches keys and values based on==notequals().HashEntryDecorates anotherMapto create objects in the map on demand.Decorates anotherSortedMapto create objects in the map on demand.AMapimplementation that maintains the order of the entries.Decorates aMapto ensure that the order of addition is retained using aListto maintain order.AMapimplementation with a fixed maximum size which removes the least recently used entry if an entry is added when full.AMapimplementation that uses multiple keys to map the value.A MultiValueMap decorates another map, allowing it to have more than one value for a key.Decorates anotherMapto validate that additions match a specified predicate.Decorates anotherSortedMapto validate that additions match a specified predicate.AMapimplementation that allows mappings to be removed by the garbage collector and matches keys and values based on==notequals().AMapimplementation that allows mappings to be removed by the garbage collector.AMapimplementation that holds a single item and is fixed size.A StaticBucketMap is an efficient, thread-safe implementation ofjava.util.Mapthat performs well in in a highly thread-contentious environment.Decorates anotherMapto transform objects that are added.Decorates anotherSortedMapto transform objects that are added.Decorates anotherMapto validate that elements added are of a specific type.Decorates anotherSortedMapto validate that elements added are of a specific type.Decorates a map entrySetto ensure it can't be altered.Decorates anotherMapto ensure it can't be altered.Decorates anotherOrderedMapto ensure it can't be altered.Decorates anotherSortedMapto ensure it can't be altered.