E - the class of the elements of this list.public static final class CollectionsExt.ImmutableSortedSet<E> extends CollectionsExt.AbstractImmutableCollection<SortedSet<E>,E> implements SortedSet<E>
| Modifier and Type | Field and Description |
|---|---|
private SortedSet<E> |
set
The enclosed sorted set containing the elements of this sorted set.
|
| Constructor and Description |
|---|
ImmutableSortedSet(Set<CollectionsExt.Modification> mods,
SortedSet<E> set) |
ImmutableSortedSet(SortedSet<E> set) |
| Modifier and Type | Method and Description |
|---|---|
Comparator<? super E> |
comparator() |
E |
first() |
SortedSet<E> |
headSet(E toElement)
Returns a view of the portion of this set
whose elements are strictly less than
toElement. |
E |
last() |
SortedSet<E> |
subSet(E fromElement,
E toElement)
Returns a view of the portion of this set
whose elements range from
fromElement,
inclusive, to toElement, exclusive. |
SortedSet<E> |
tailSet(E fromElement)
Returns a view of the portion of this set
whose elements are greater than or equal to
fromElement. |
SortedSet<E> |
unrestricted()
Returns the underlying set without the restrictions
imposed by this
CollectionsExt.ImmutableCollection. |
add, addAll, allowedModifications, allowModification, allowModifications, clear, iterator, remove, removeAll, removeIf, retainAll, size, toStringcontains, containsAll, isEmpty, toArray, toArrayclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitspliteratoradd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayparallelStream, removeIf, streamImmutableSortedSet(Set<CollectionsExt.Modification> mods, SortedSet<E> set)
public SortedSet<E> unrestricted()
CollectionsExt.AbstractImmutableCollectionCollectionsExt.ImmutableCollection.
Note that the result
may still throw UnsupportedOperationExceptions
depending on the implementation.unrestricted in class CollectionsExt.AbstractImmutableCollection<SortedSet<E>,E>public Comparator<? super E> comparator()
comparator in interface SortedSet<E>public SortedSet<E> headSet(E toElement)
toElement.
For information on backing see subSet(Object, Object).public SortedSet<E> subSet(E fromElement, E toElement)
fromElement,
inclusive, to toElement, exclusive.
(If fromElement and toElement are equal, the returned set is empty.)
The returned set is backed by this set,
so changes in the returned set are reflected in this set,
and vice-versa.
The returned set supports all optional set operations
that this set supports.
In particular, changes of the allowed modifications
(returned by CollectionsExt.AbstractImmutableCollection.allowedModifications())
of the returned set are reflected in this set, and vice-versa.Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.