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<? extends E> coll) |
void |
clear() |
Iterator<E> |
descendingIterator() |
NavigableSet<E> |
descendingSet() |
SortedSet<E> |
headSet(E toElement) |
NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
Iterator<E> |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> coll) |
boolean |
retainAll(Collection<?> coll) |
NavigableSet<E> |
subSet(E fromElement,
boolean fromInclusive,
E toElement,
boolean toInclusive) |
SortedSet<E> |
subSet(E fromElement,
E toElement) |
SortedSet<E> |
tailSet(E fromElement) |
NavigableSet<E> |
tailSet(E fromElement,
boolean inclusive) |
static <E> NavigableSet<E> |
unmodifiableNavigableSet(NavigableSet<E> set)
Factory method to create an unmodifiable set.
|
ceiling, decorated, floor, higher, lower, pollFirst, pollLast
comparator, first, last
equals, hashCode
contains, containsAll, isEmpty, setCollection, size, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparator, first, last
public static <E> NavigableSet<E> unmodifiableNavigableSet(NavigableSet<E> set)
E
- the element typeset
- the set to decorate, must not be nullNavigableSet
NullPointerException
- if set is nullpublic Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface NavigableSet<E>
iterator
in interface Set<E>
iterator
in class AbstractCollectionDecorator<E>
public boolean add(E object)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollectionDecorator<E>
public boolean addAll(Collection<? extends E> coll)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in class AbstractCollectionDecorator<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class AbstractCollectionDecorator<E>
public boolean remove(Object object)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollectionDecorator<E>
public boolean removeAll(Collection<?> coll)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in class AbstractCollectionDecorator<E>
public boolean retainAll(Collection<?> coll)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
retainAll
in class AbstractCollectionDecorator<E>
public SortedSet<E> subSet(E fromElement, E toElement)
subSet
in interface NavigableSet<E>
subSet
in interface SortedSet<E>
subSet
in class AbstractSortedSetDecorator<E>
public SortedSet<E> headSet(E toElement)
headSet
in interface NavigableSet<E>
headSet
in interface SortedSet<E>
headSet
in class AbstractSortedSetDecorator<E>
public SortedSet<E> tailSet(E fromElement)
tailSet
in interface NavigableSet<E>
tailSet
in interface SortedSet<E>
tailSet
in class AbstractSortedSetDecorator<E>
public NavigableSet<E> descendingSet()
descendingSet
in interface NavigableSet<E>
descendingSet
in class AbstractNavigableSetDecorator<E>
public Iterator<E> descendingIterator()
descendingIterator
in interface NavigableSet<E>
descendingIterator
in class AbstractNavigableSetDecorator<E>
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
subSet
in interface NavigableSet<E>
subSet
in class AbstractNavigableSetDecorator<E>
public NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet
in interface NavigableSet<E>
headSet
in class AbstractNavigableSetDecorator<E>
public NavigableSet<E> tailSet(E fromElement, boolean inclusive)
tailSet
in interface NavigableSet<E>
tailSet
in class AbstractNavigableSetDecorator<E>
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.