|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.common.collect.ImmutableSortedSet.Factory<E>
public static class ImmutableSortedSet.Factory<E>
A factory for creating immutable sorted sets with an explicit comparator.
The factory is immutable and may be used to create multiple
ImmutableSortedSet
instances.
Constructor Summary | |
---|---|
ImmutableSortedSet.Factory(Comparator<? super E> comparator)
Creates a new factory. |
Method Summary | |
---|---|
ImmutableSortedSet<E> |
copyOf(Iterable<? extends E> elements)
Returns an immutable sorted set containing the given elements sorted by the factory's comparator. |
ImmutableSortedSet<E> |
copyOf(Iterator<? extends E> elements)
Returns an immutable sorted set containing the given elements sorted by the factory's comparator. |
ImmutableSortedSet<E> |
of(E... elements)
Returns an immutable sorted set containing the given elements sorted by the factory's comparator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImmutableSortedSet.Factory(Comparator<? super E> comparator)
ImmutableSortedSet.orderedBy(java.util.Comparator)
.
NullPointerException
- if comparator
is nullMethod Detail |
---|
public ImmutableSortedSet<E> of(E... elements)
NullPointerException
- if any of elements
is nullpublic ImmutableSortedSet<E> copyOf(Iterable<? extends E> elements)
Note: Despite what the method name suggests, if
elements
is an ImmutableSortedSet
with an equivalent
comparator, it may be returned instead of a copy.
NullPointerException
- if any of elements
is nullpublic ImmutableSortedSet<E> copyOf(Iterator<? extends E> elements)
NullPointerException
- if any of elements
is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |