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 Kceiling(K e)voidclear()Comparator<? super K>comparator()booleancontains(Object o)Iterator<K>descendingIterator()NavigableSet<K>descendingSet()Kfirst()Kfloor(K e)voidforEach(Consumer<? super K> action)SortedSet<K>headSet(K toElement)NavigableSet<K>headSet(K toElement, boolean inclusive)Khigher(K e)booleanisEmpty()Iterator<K>iterator()Klast()Klower(K e)KpollFirst()KpollLast()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()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:
lowerin interfaceNavigableSet<K extends @Nullable Object>
-
floor
@CheckForNull public K floor(K e)
- Specified by:
floorin interfaceNavigableSet<K extends @Nullable Object>
-
ceiling
@CheckForNull public K ceiling(K e)
- Specified by:
ceilingin interfaceNavigableSet<K extends @Nullable Object>
-
higher
@CheckForNull public K higher(K e)
- Specified by:
higherin interfaceNavigableSet<K extends @Nullable Object>
-
pollFirst
@CheckForNull public K pollFirst()
- Specified by:
pollFirstin interfaceNavigableSet<K extends @Nullable Object>
-
pollLast
@CheckForNull public K pollLast()
- Specified by:
pollLastin interfaceNavigableSet<K extends @Nullable Object>
-
descendingSet
public NavigableSet<K> descendingSet()
- Specified by:
descendingSetin interfaceNavigableSet<K extends @Nullable Object>
-
descendingIterator
public Iterator<K> descendingIterator()
- Specified by:
descendingIteratorin interfaceNavigableSet<K extends @Nullable Object>
-
subSet
public NavigableSet<K> subSet(K fromElement, boolean fromInclusive, K toElement, boolean toInclusive)
- Specified by:
subSetin 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:
headSetin interfaceNavigableSet<K extends @Nullable Object>
-
headSet
public SortedSet<K> headSet(K toElement)
-
tailSet
public NavigableSet<K> tailSet(K fromElement, boolean inclusive)
- Specified by:
tailSetin interfaceNavigableSet<K extends @Nullable Object>
-
tailSet
public SortedSet<K> tailSet(K fromElement)
-
comparator
@CheckForNull public Comparator<? super K> comparator()
- Specified by:
comparatorin 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)
-
-