Package com.google.common.collect
Class Sets.UnmodifiableNavigableSet<E>
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- com.google.common.collect.ForwardingCollection<E>
-
- com.google.common.collect.ForwardingSet<E>
-
- com.google.common.collect.ForwardingSortedSet<E>
-
- com.google.common.collect.Sets.UnmodifiableNavigableSet<E>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.NavigableSet<E>
,java.util.Set<E>
,java.util.SortedSet<E>
- Enclosing class:
- Sets
static final class Sets.UnmodifiableNavigableSet<E> extends ForwardingSortedSet<E> implements java.util.NavigableSet<E>, java.io.Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.NavigableSet<E>
delegate
private Sets.UnmodifiableNavigableSet<E>
descendingSet
private static long
serialVersionUID
private java.util.SortedSet<E>
unmodifiableDelegate
-
Constructor Summary
Constructors Constructor Description UnmodifiableNavigableSet(java.util.NavigableSet<E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
ceiling(E e)
protected java.util.SortedSet<E>
delegate()
Returns the backing delegate instance that methods are forwarded to.java.util.Iterator<E>
descendingIterator()
java.util.NavigableSet<E>
descendingSet()
E
floor(E e)
void
forEach(java.util.function.Consumer<? super E> action)
java.util.NavigableSet<E>
headSet(E toElement, boolean inclusive)
E
higher(E e)
E
lower(E e)
java.util.stream.Stream<E>
parallelStream()
E
pollFirst()
E
pollLast()
boolean
removeIf(java.util.function.Predicate<? super E> filter)
java.util.stream.Stream<E>
stream()
java.util.NavigableSet<E>
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
java.util.NavigableSet<E>
tailSet(E fromElement, boolean inclusive)
-
Methods inherited from class com.google.common.collect.ForwardingSortedSet
comparator, first, headSet, last, standardContains, standardRemove, standardSubSet, subSet, tailSet
-
Methods inherited from class com.google.common.collect.ForwardingSet
equals, hashCode, standardEquals, standardHashCode, standardRemoveAll
-
Methods inherited from class com.google.common.collect.ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContainsAll, standardIsEmpty, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
delegate
private final java.util.NavigableSet<E> delegate
-
unmodifiableDelegate
private final java.util.SortedSet<E> unmodifiableDelegate
-
descendingSet
@CheckForNull private transient Sets.UnmodifiableNavigableSet<E> descendingSet
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnmodifiableNavigableSet
UnmodifiableNavigableSet(java.util.NavigableSet<E> delegate)
-
-
Method Detail
-
delegate
protected java.util.SortedSet<E> delegate()
Description copied from class:ForwardingObject
Returns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such asForwardingSet.delegate()
. Concrete subclasses override this method to supply the instance being decorated.- Specified by:
delegate
in classForwardingSortedSet<E>
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super E> filter)
- Specified by:
removeIf
in interfacejava.util.Collection<E>
-
stream
public java.util.stream.Stream<E> stream()
- Specified by:
stream
in interfacejava.util.Collection<E>
-
parallelStream
public java.util.stream.Stream<E> parallelStream()
- Specified by:
parallelStream
in interfacejava.util.Collection<E>
-
forEach
public void forEach(java.util.function.Consumer<? super E> action)
- Specified by:
forEach
in interfacejava.lang.Iterable<E>
-
ceiling
@CheckForNull public E ceiling(E e)
- Specified by:
ceiling
in interfacejava.util.NavigableSet<E>
-
higher
@CheckForNull public E higher(E e)
- Specified by:
higher
in interfacejava.util.NavigableSet<E>
-
pollFirst
@CheckForNull public E pollFirst()
- Specified by:
pollFirst
in interfacejava.util.NavigableSet<E>
-
pollLast
@CheckForNull public E pollLast()
- Specified by:
pollLast
in interfacejava.util.NavigableSet<E>
-
descendingSet
public java.util.NavigableSet<E> descendingSet()
- Specified by:
descendingSet
in interfacejava.util.NavigableSet<E>
-
descendingIterator
public java.util.Iterator<E> descendingIterator()
- Specified by:
descendingIterator
in interfacejava.util.NavigableSet<E>
-
subSet
public java.util.NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
- Specified by:
subSet
in interfacejava.util.NavigableSet<E>
-
headSet
public java.util.NavigableSet<E> headSet(E toElement, boolean inclusive)
- Specified by:
headSet
in interfacejava.util.NavigableSet<E>
-
-