Class ImmutableSortedSet<E>

All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, NavigableSet<E>, SequencedCollection<E>, SequencedSet<E>, Set<E>, SortedSet<E>
Direct Known Subclasses:
ContiguousSet

@GwtCompatible(serializable=true, emulated=true) public abstract class ImmutableSortedSet<E> extends ImmutableSet<E> implements NavigableSet<E>
A NavigableSet 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 collection will not correctly obey its specification.

See the Guava User Guide article on immutable collections.

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