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(java.util.Collection<? extends E> coll) |
void |
clear() |
java.util.Iterator<E> |
descendingIterator() |
java.util.NavigableSet<E> |
descendingSet() |
java.util.SortedSet<E> |
headSet(E toElement) |
java.util.NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object object) |
boolean |
removeAll(java.util.Collection<?> coll) |
boolean |
retainAll(java.util.Collection<?> coll) |
java.util.NavigableSet<E> |
subSet(E fromElement,
boolean fromInclusive,
E toElement,
boolean toInclusive) |
java.util.SortedSet<E> |
subSet(E fromElement,
E toElement) |
java.util.SortedSet<E> |
tailSet(E fromElement) |
java.util.NavigableSet<E> |
tailSet(E fromElement,
boolean inclusive) |
static <E> java.util.NavigableSet<E> |
unmodifiableNavigableSet(java.util.NavigableSet<E> set)
Factory method to create an unmodifiable set.
|
ceiling, floor, higher, lower, pollFirst, pollLast
comparator, first, last
equals, hashCode
contains, containsAll, isEmpty, size, toArray, toArray, toString
public static <E> java.util.NavigableSet<E> unmodifiableNavigableSet(java.util.NavigableSet<E> set)
E
- the element typeset
- the set to decorate, must not be nullNavigableSet
java.lang.NullPointerException
- if set is nullpublic java.util.Iterator<E> iterator()
public boolean add(E object)
add
in interface java.util.Collection<E>
add
in interface java.util.Set<E>
add
in class AbstractCollectionDecorator<E>
public boolean addAll(java.util.Collection<? extends E> coll)
addAll
in interface java.util.Collection<E>
addAll
in interface java.util.Set<E>
addAll
in class AbstractCollectionDecorator<E>
public void clear()
clear
in interface java.util.Collection<E>
clear
in interface java.util.Set<E>
clear
in class AbstractCollectionDecorator<E>
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<E>
remove
in interface java.util.Set<E>
remove
in class AbstractCollectionDecorator<E>
public boolean removeAll(java.util.Collection<?> coll)
removeAll
in interface java.util.Collection<E>
removeAll
in interface java.util.Set<E>
removeAll
in class AbstractCollectionDecorator<E>
public boolean retainAll(java.util.Collection<?> coll)
retainAll
in interface java.util.Collection<E>
retainAll
in interface java.util.Set<E>
retainAll
in class AbstractCollectionDecorator<E>
public java.util.SortedSet<E> subSet(E fromElement, E toElement)
subSet
in interface java.util.NavigableSet<E>
subSet
in interface java.util.SortedSet<E>
subSet
in class AbstractSortedSetDecorator<E>
public java.util.SortedSet<E> headSet(E toElement)
headSet
in interface java.util.NavigableSet<E>
headSet
in interface java.util.SortedSet<E>
headSet
in class AbstractSortedSetDecorator<E>
public java.util.SortedSet<E> tailSet(E fromElement)
tailSet
in interface java.util.NavigableSet<E>
tailSet
in interface java.util.SortedSet<E>
tailSet
in class AbstractSortedSetDecorator<E>
public java.util.NavigableSet<E> descendingSet()
descendingSet
in interface java.util.NavigableSet<E>
descendingSet
in class AbstractNavigableSetDecorator<E>
public java.util.Iterator<E> descendingIterator()
descendingIterator
in interface java.util.NavigableSet<E>
descendingIterator
in class AbstractNavigableSetDecorator<E>
public java.util.NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
subSet
in interface java.util.NavigableSet<E>
subSet
in class AbstractNavigableSetDecorator<E>
public java.util.NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet
in interface java.util.NavigableSet<E>
headSet
in class AbstractNavigableSetDecorator<E>
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"