Class TransformedSortedMap<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>, Get<K,V>, IterableGet<K,V>, IterableMap<K,V>, Put<K,V>

public class TransformedSortedMap<K,V> extends TransformedMap<K,V> implements SortedMap<K,V>
Decorates another SortedMap to transform objects that are added.

The Map put methods and Map.Entry setValue method are affected by this class. Thus objects must be removed or searched for using their transformed form. For example, if the transformation converts Strings to Integers, you must use the Integer form to remove objects.

Note that TransformedSortedMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. The simplest approach is to wrap this map using Collections.synchronizedSortedMap(java.util.SortedMap<K, V>). This class may throw exceptions when accessed by concurrent threads without synchronization.

This class is Serializable from Commons Collections 3.1.

Since:
3.0
See Also: