An immutable SortedSet that stores its elements in a sorted array.
Some instances are ordered by an explicit comparator, while others follow the
natural sort ordering of their elements. Either way, null elements are not
supported.

Unlike java.util.Collections.unmodifiableSortedSet(java.util.SortedSet), which is a view
of a separate collection that can still change, an instance of ImmutableSortedSet contains its own private data and will never
change. This class is convenient for public static final sets
("constant sets") and also lets you easily make a "defensive copy" of a set
provided to your class by a caller.

With natural ordering of elements, the following relation determines whether
two elements are equivalent:

{(x, y) | x.compareTo(y) == 0}

Warning: Like most sets, an ImmutableSortedSet will not
function correctly if an element is modified after being placed in the set.
For this reason, and to avoid general confusion, it is strongly recommended
to place only immutable objects into this collection.

Note: Although this class is not final, it cannot be subclassed as
it has no public or protected constructors. Thus, instances of this type are
guaranteed to be immutable.

Returns an immutable sorted set containing the given elements sorted by
their natural ordering. When multiple elements are equivalent according to
compareTo(), only the first one specified is included. To create a
copy of a SortedSet that preserves the comparator, call copyOfSorted(java.util.SortedSet) instead. This method iterates over elements at most
once.

Note that if s is a Set<String>, then ImmutableSortedSet.copyOf(s) returns an ImmutableSortedSet<String>
containing each of the strings in s, while ImmutableSortedSet.of(s) returns an ImmutableSortedSet<Set<String>> containing one element (the given set
itself).

Despite the method name, this method attempts to avoid actually copying
the data when it is safe to do so. The exact circumstances under which a
copy will or will not be performed are undocumented and subject to change.

This method is not type-safe, as it may be called on elements that are
not mutually comparable.

Returns an immutable sorted set containing the given elements sorted by
their natural ordering. When multiple elements are equivalent according to
compareTo(), only the first one specified is included. To create a
copy of a SortedSet that preserves the comparator, call
copyOfSorted(java.util.SortedSet) instead. This method iterates over elements
at most once.

Note that if s is a Set<String>, then
ImmutableSortedSet.copyOf(s) returns an
ImmutableSortedSet<String> containing each of the strings in
s, while ImmutableSortedSet.of(s) returns an
ImmutableSortedSet<Set<String>> containing one element (the given
set itself).

Note: Despite what the method name suggests, if elements
is an ImmutableSortedSet, it may be returned instead of a copy.

This method is not type-safe, as it may be called on elements that are
not mutually comparable.

This method is safe to use even when elements is a synchronized
or concurrent collection that is currently being modified by another
thread.

Returns an immutable sorted set containing the given elements sorted by
their natural ordering. When multiple elements are equivalent according to
compareTo(), only the first one specified is included.

This method is not type-safe, as it may be called on elements that are
not mutually comparable.

Returns an immutable sorted set containing the given elements sorted by
the given Comparator. When multiple elements are equivalent
according to compare(), only the first one specified is
included. This method iterates over elements at most once.

Despite the method name, this method attempts to avoid actually copying
the data when it is safe to do so. The exact circumstances under which a
copy will or will not be performed are undocumented and subject to change.

Returns an immutable sorted set containing the given elements sorted by
the given Comparator. When multiple elements are equivalent
according to compareTo(), only the first one specified is
included.

Despite the method name, this method attempts to avoid actually copying
the data when it is safe to do so. The exact circumstances under which a
copy will or will not be performed are undocumented and subject to change.

This method is safe to use even when elements is a synchronized
or concurrent collection that is currently being modified by another
thread.

Returns an immutable sorted set containing the elements of a sorted set,
sorted by the same Comparator. That behavior differs from copyOf(java.lang.Iterable), which always uses the natural ordering of the
elements.

Despite the method name, this method attempts to avoid actually copying
the data when it is safe to do so. The exact circumstances under which a
copy will or will not be performed are undocumented and subject to change.

This method is safe to use even when sortedSet is a synchronized
or concurrent collection that is currently being modified by another
thread.

Constructs an ImmutableSortedSet from the first n elements of
contents. If k is the size of the returned ImmutableSortedSet, then
the sorted unique elements are in the first k positions of contents, and
contents[i] == null for k <= i < n.

If k == contents.length, then contents may no longer be safe for
modification.

Returns a builder that creates immutable sorted sets with an explicit
comparator. If the comparator has a more general type than the set being
generated, such as creating a SortedSet<Integer> with a
Comparator<Number>, use the ImmutableSortedSet.Builder constructor instead.

Returns the comparator that orders the elements, which is
Ordering.natural() when the natural ordering of the
elements is used. Note that its behavior is not consistent with
java.util.SortedSet.comparator(), which returns null to indicate
natural ordering.