Class ImmutableSortedMap<K,V>

java.lang.Object
com.google.common.collect.ImmutableMap<K,V>
com.google.common.collect.ImmutableSortedMap<K,V>
All Implemented Interfaces:
Serializable, Map<K,V>, NavigableMap<K,V>, SequencedMap<K,V>, SortedMap<K,V>

@GwtCompatible(serializable=true, emulated=true) public final class ImmutableSortedMap<K,V> extends ImmutableMap<K,V> implements NavigableMap<K,V>
A NavigableMap whose contents will never change, with many other important properties detailed at ImmutableCollection.

Warning: as with any sorted collection, you are strongly advised not to use a Comparator or Comparable type whose comparison behavior is inconsistent with equals. That is, a.compareTo(b) or comparator.compare(a, b) should equal zero if and only if a.equals(b). If this advice is not followed, the resulting map will not correctly obey its specification.

See the Guava User Guide article on immutable collections.

Since:
2.0 (implements NavigableMap since 12.0)
Author:
Jared Levy, Louis Wasserman
See Also: