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:
Iterable<K>
,Collection<K>
,NavigableSet<K>
,Set<K>
,SortedSet<K>
protected class ForwardingNavigableMap.StandardNavigableKeySet extends 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()
Comparator<? super K>
comparator()
boolean
contains(Object o)
Iterator<K>
descendingIterator()
NavigableSet<K>
descendingSet()
K
first()
K
floor(K e)
void
forEach(Consumer<? super K> action)
SortedSet<K>
headSet(K toElement)
NavigableSet<K>
headSet(K toElement, boolean inclusive)
K
higher(K e)
boolean
isEmpty()
Iterator<K>
iterator()
K
last()
K
lower(K e)
K
pollFirst()
K
pollLast()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
NavigableSet<K>
subSet(K fromElement, boolean fromInclusive, K toElement, boolean toInclusive)
SortedSet<K>
subSet(K fromElement, K toElement)
SortedSet<K>
tailSet(K fromElement)
NavigableSet<K>
tailSet(K fromElement, boolean inclusive)
-
Methods inherited from class java.util.AbstractSet
equals, hashCode
-
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
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.NavigableSet
iterator
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
comparator, first, last, spliterator
-
-
-
-
Constructor Detail
-
StandardNavigableKeySet
public StandardNavigableKeySet()
Constructor for use by subclasses.
-
-
Method Detail
-
lower
@CheckForNull public K lower(K e)
- Specified by:
lower
in interfaceNavigableSet<K extends @Nullable Object>
-
floor
@CheckForNull public K floor(K e)
- Specified by:
floor
in interfaceNavigableSet<K extends @Nullable Object>
-
ceiling
@CheckForNull public K ceiling(K e)
- Specified by:
ceiling
in interfaceNavigableSet<K extends @Nullable Object>
-
higher
@CheckForNull public K higher(K e)
- Specified by:
higher
in interfaceNavigableSet<K extends @Nullable Object>
-
pollFirst
@CheckForNull public K pollFirst()
- Specified by:
pollFirst
in interfaceNavigableSet<K extends @Nullable Object>
-
pollLast
@CheckForNull public K pollLast()
- Specified by:
pollLast
in interfaceNavigableSet<K extends @Nullable Object>
-
descendingSet
public NavigableSet<K> descendingSet()
- Specified by:
descendingSet
in interfaceNavigableSet<K extends @Nullable Object>
-
descendingIterator
public Iterator<K> descendingIterator()
- Specified by:
descendingIterator
in interfaceNavigableSet<K extends @Nullable Object>
-
subSet
public NavigableSet<K> subSet(K fromElement, boolean fromInclusive, K toElement, boolean toInclusive)
- Specified by:
subSet
in interfaceNavigableSet<K extends @Nullable Object>
-
subSet
public SortedSet<K> subSet(K fromElement, K toElement)
-
headSet
public NavigableSet<K> headSet(K toElement, boolean inclusive)
- Specified by:
headSet
in interfaceNavigableSet<K extends @Nullable Object>
-
headSet
public SortedSet<K> headSet(K toElement)
-
tailSet
public NavigableSet<K> tailSet(K fromElement, boolean inclusive)
- Specified by:
tailSet
in interfaceNavigableSet<K extends @Nullable Object>
-
tailSet
public SortedSet<K> tailSet(K fromElement)
-
comparator
@CheckForNull public Comparator<? super K> comparator()
- Specified by:
comparator
in interfaceSortedSet<K extends @Nullable Object>
-
iterator
public Iterator<K> iterator()
-
forEach
public void forEach(Consumer<? super K> action)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(@CheckForNull Object o)
-
remove
public boolean remove(@CheckForNull Object o)
-
clear
public void clear()
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
-