NavigableSet to ensure it can't be altered.
Attempts to modify it will result in an UnsupportedOperationException.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| private | UnmodifiableNavigableSet(final NavigableSet<E>
the set to decorate, must not be null set)Constructor that wraps (not copies). |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(final E
element to be added to this set object)Overrides org. Implements java. |
| public boolean | addAll(final Collection<? extends E>
collection containing elements to be added to this set coll)Overrides org. Implements java. |
| public void | clear()
Overrides org. Implements java. |
| public Iterator | descendingIterator()
Overrides org. Implements java. |
| public NavigableSet | descendingSet()
Overrides org. Implements java. |
| public SortedSet | headSet(final E
high endpoint (exclusive) of the returned set toElement)Overrides org. Implements java. toElement.
|
| public NavigableSet | headSet(final E
high endpoint of the returned set toElement, final boolean true if the high endpoint
is to be included in the returned viewOverrides org. Implements java. inclusive is true) toElement.
|
| public Iterator | iterator()
Overrides org. Implements java. |
| private void | readObject(final ObjectInputStream
the input stream in)Read the collection in using a custom routine. |
| public boolean | remove(final Object
object to be removed from this set, if present object)Overrides org. Implements java. |
| public boolean | removeAll(final Collection<?>
collection containing elements to be removed from this set coll)Overrides org. Implements java. |
| public boolean | removeIf(Predicate<? super E>
a predicate which returns filter)true for elements to be
removedOverrides org. Overrides default java. |
| public boolean | retainAll(final Collection<?>
collection containing elements to be retained in this set coll)Overrides org. Implements java. |
| public SortedSet | subSet(final E
low endpoint (inclusive) of the returned set fromElement, final E high endpoint (exclusive) of the returned set toElement)Overrides org. Implements java. fromElement, inclusive, to toElement,
exclusive.
|
| public NavigableSet | subSet(final E
low endpoint of the returned set fromElement, final boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the returned set toElement, final boolean true if the high endpoint
is to be included in the returned viewOverrides org. Implements java. fromElement to toElement.
|
| public SortedSet | tailSet(final E
low endpoint (inclusive) of the returned set fromElement)Overrides org. Implements java. fromElement.
|
| public NavigableSet | tailSet(final E
low endpoint of the returned set fromElement, final boolean true if the low endpoint
is to be included in the returned viewOverrides org. Implements java. inclusive is true) fromElement.
|
| public static < the element type E> NavigableSet | Returns: a new unmodifiableNavigableSetthe set to decorate, must not be null set)Factory method to create an unmodifiable set. |
| private void | writeObject(final ObjectOutputStream
the output stream out)Write the collection out using a custom routine. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serialization version | |
| UnmodifiableNavigableSet | back to summary |
|---|---|
| private UnmodifiableNavigableSet(final NavigableSet<E> set) Constructor that wraps (not copies).
| |
| add | back to summary |
|---|---|
| public boolean add(final E object) Overrides org. Implements java. Doc from java. Adds the specified element to this set if it is not already present
(optional operation). More formally, adds the specified element
The stipulation above does not imply that sets must accept all
elements; sets may refuse to add any particular element, including
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(final Collection<? extends E> coll) Overrides org. Implements java. Doc from java. Adds all of the elements in the specified collection to this set if
they're not already present (optional operation). If the specified
collection is also a set, the
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides org. Implements java. Doc from java. Removes all of the elements from this set (optional operation). The set will be empty after this call returns.
| |
| descendingIterator | back to summary |
|---|---|
| public Iterator Overrides org. Implements java. Doc from java. Returns an iterator over the elements in this set, in descending order.
Equivalent in effect to | |
| descendingSet | back to summary |
|---|---|
| public NavigableSet Overrides org. Implements java. Doc from java. Returns a reverse order view of the elements contained in this set.
The descending set is backed by this set, so changes to the set are
reflected in the descending set, and vice-versa. If either set is
modified while an iteration over either set is in progress (except
through the iterator's own The returned set has an ordering equivalent to
| |
| headSet | back to summary |
|---|---|
| public SortedSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements are
strictly less than The returned set will throw an Equivalent to
| |
| headSet | back to summary |
|---|---|
| public NavigableSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements are less than
(or equal to, if The returned set will throw an
| |
| iterator | back to summary |
|---|---|
| public Iterator Overrides org. Implements java. Doc from java. Returns an iterator over the elements in this set, in ascending order. | |
| readObject | back to summary |
|---|---|
| private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException Read the collection in using a custom routine.
| |
| remove | back to summary |
|---|---|
| public boolean remove(final Object object) Overrides org. Implements java. Doc from java. Removes the specified element from this set if it is present
(optional operation). More formally, removes an element | |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(final Collection<?> coll) Overrides org. Implements java. Doc from java. Removes from this set all of its elements that are contained in the specified collection (optional operation). If the specified collection is also a set, this operation effectively modifies this set so that its value is the asymmetric set difference of the two sets.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(Predicate<? super E> filter) Overrides org. Overrides default java. Doc from java. Removes all of the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller. | |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(final Collection<?> coll) Overrides org. Implements java. Doc from java. Retains only the elements in this set that are contained in the specified collection (optional operation). In other words, removes from this set all of its elements that are not contained in the specified collection. If the specified collection is also a set, this operation effectively modifies this set so that its value is the intersection of the two sets.
| |
| subSet | back to summary |
|---|---|
| public SortedSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements range
from The returned set will throw an Equivalent to
| |
| subSet | back to summary |
|---|---|
| public NavigableSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements range from
The returned set will throw an
| |
| tailSet | back to summary |
|---|---|
| public SortedSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements are
greater than or equal to The returned set will throw an Equivalent to
| |
| tailSet | back to summary |
|---|---|
| public NavigableSet Overrides org. Implements java. Doc from java. Returns a view of the portion of this set whose elements are greater
than (or equal to, if The returned set will throw an
| |
| unmodifiableNavigableSet | back to summary |
|---|---|
| public static <E> NavigableSet Factory method to create an unmodifiable set.
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(final ObjectOutputStream out) throws IOException Write the collection out using a custom routine.
| |