public final class UnmodifiableNavigableSet<E> extends AbstractNavigableSetDecorator<E> implements Unmodifiable
NavigableSet to ensure it can't be altered.
Attempts to modify it will result in an UnsupportedOperationException.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E object)
|
boolean |
addAll(Collection
|
void |
clear()
|
Iterator |
descendingIterator()
|
NavigableSet |
descendingSet()
|
SortedSet |
headSet(E toElement)
|
NavigableSet |
headSet(E toElement, boolean inclusive)
|
Iterator |
iterator()
|
boolean |
remove(Object
|
boolean |
removeAll(Collection
|
boolean |
retainAll(Collection
|
NavigableSet |
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
|
SortedSet |
subSet(E fromElement, E toElement)
|
SortedSet |
tailSet(E fromElement)
|
NavigableSet |
tailSet(E fromElement, boolean inclusive)
|
static <E> NavigableSet |
unmodifiableNavigableSet(NavigableSet
Factory method to create an unmodifiable set.
|
ceiling, decorated, floor, higher, lower, pollFirst, pollLastcomparator, first, lastequals, hashCodecontains, containsAll, isEmpty, setCollection, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparator, first, last, spliteratorcontains, containsAll, equals, hashCode, isEmpty, size, toArray, toArrayparallelStream, removeIf, streampublic static <E> NavigableSet<E> unmodifiableNavigableSet(NavigableSet <E> set)
E - the element type
set - the set to decorate, must not be null
NavigableSet
NullPointerException - if set is null
public boolean add(E object)
public boolean addAll(Collection<? extends E> coll)
public void clear()
public boolean remove(Objectobject)
public boolean removeAll(Collection<?> coll)
public boolean retainAll(Collection<?> coll)
public NavigableSet<E> descendingSet()
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
public NavigableSet<E> headSet(E toElement, boolean inclusive)
public NavigableSet<E> tailSet(E fromElement, boolean inclusive)