Class TransformedSortedMap

  • All Implemented Interfaces:
    Serializable, Map, SortedMap

    public class TransformedSortedMap
    extends TransformedMap
    implements SortedMap
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    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.

    Commons Collections 3.0
    See Also:
    Serialized Form