Package com.google.common.collect
Class ForwardingNavigableMap.StandardNavigableKeySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- com.google.common.collect.ForwardingNavigableMap.StandardNavigableKeySet
-
- All Implemented Interfaces:
java.lang.Iterable<K>
,java.util.Collection<K>
,java.util.NavigableSet<K>
,java.util.Set<K>
,java.util.SortedSet<K>
- Enclosing class:
- ForwardingNavigableMap<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
protected class ForwardingNavigableMap.StandardNavigableKeySet extends java.util.AbstractSet<E>
A sensible implementation ofNavigableMap.navigableKeySet()
in terms of the methods of thisNavigableMap
. In many cases, you may wish to overrideForwardingNavigableMap.navigableKeySet()
to forward to this implementation or a subclass thereof.- Since:
- 12.0
-
-
Constructor Summary
Constructors Constructor Description StandardNavigableKeySet()
Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description K
ceiling(K e)
void
clear()
java.util.Comparator<? super K>
comparator()
boolean
contains(java.lang.Object o)
java.util.Iterator<K>
descendingIterator()
java.util.NavigableSet<K>
descendingSet()
K
first()
K
floor(K e)
java.util.SortedSet<K>
headSet(K toElement)
java.util.NavigableSet<K>
headSet(K toElement, boolean inclusive)
K
higher(K e)
boolean
isEmpty()
java.util.Iterator<K>
iterator()
K
last()
K
lower(K e)
K
pollFirst()
K
pollLast()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
java.util.NavigableSet<K>
subSet(K fromElement, boolean fromInclusive, K toElement, boolean toInclusive)
java.util.SortedSet<K>
subSet(K fromElement, K toElement)
java.util.SortedSet<K>
tailSet(K fromElement)
java.util.NavigableSet<K>
tailSet(K fromElement, boolean inclusive)
-
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
StandardNavigableKeySet
public StandardNavigableKeySet()
Constructor for use by subclasses.
-
-
Method Detail
-
lower
@CheckForNull public K lower(K e)
- Specified by:
lower
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
floor
@CheckForNull public K floor(K e)
- Specified by:
floor
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
ceiling
@CheckForNull public K ceiling(K e)
- Specified by:
ceiling
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
higher
@CheckForNull public K higher(K e)
- Specified by:
higher
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
pollFirst
@CheckForNull public K pollFirst()
- Specified by:
pollFirst
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
pollLast
@CheckForNull public K pollLast()
- Specified by:
pollLast
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
descendingSet
public java.util.NavigableSet<K> descendingSet()
- Specified by:
descendingSet
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
descendingIterator
public java.util.Iterator<K> descendingIterator()
- Specified by:
descendingIterator
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
subSet
public java.util.NavigableSet<K> subSet(K fromElement, boolean fromInclusive, K toElement, boolean toInclusive)
- Specified by:
subSet
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
subSet
public java.util.SortedSet<K> subSet(K fromElement, K toElement)
-
headSet
public java.util.NavigableSet<K> headSet(K toElement, boolean inclusive)
- Specified by:
headSet
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
headSet
public java.util.SortedSet<K> headSet(K toElement)
-
tailSet
public java.util.NavigableSet<K> tailSet(K fromElement, boolean inclusive)
- Specified by:
tailSet
in interfacejava.util.NavigableSet<K extends @Nullable java.lang.Object>
-
tailSet
public java.util.SortedSet<K> tailSet(K fromElement)
-
comparator
@CheckForNull public java.util.Comparator<? super K> comparator()
- Specified by:
comparator
in interfacejava.util.SortedSet<K extends @Nullable java.lang.Object>
-
first
public K first()
- Specified by:
first
in interfacejava.util.SortedSet<K extends @Nullable java.lang.Object>
-
last
public K last()
- Specified by:
last
in interfacejava.util.SortedSet<K extends @Nullable java.lang.Object>
-
iterator
public java.util.Iterator<K> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
iterator
in interfacejava.lang.Iterable<K extends @Nullable java.lang.Object>
- Specified by:
iterator
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Specified by:
iterator
in classjava.util.AbstractCollection<K extends @Nullable java.lang.Object>
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(@CheckForNull java.lang.Object o)
-
remove
public boolean remove(@CheckForNull java.lang.Object o)
-
clear
public void clear()
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
-