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>
- Enclosing class:
- ForwardingNavigableMap<K extends @Nullable Object,V extends @Nullable Object>
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 @Nullable K
ceiling(K e)
void
clear()
@Nullable Comparator<? super K>
comparator()
boolean
contains(@Nullable Object o)
Iterator<K>
descendingIterator()
NavigableSet<K>
descendingSet()
K
first()
@Nullable K
floor(K e)
void
forEach(Consumer<? super K> action)
SortedSet<K>
headSet(K toElement)
NavigableSet<K>
headSet(K toElement, boolean inclusive)
@Nullable K
higher(K e)
boolean
isEmpty()
Iterator<K>
iterator()
K
last()
@Nullable K
lower(K e)
@Nullable K
pollFirst()
@Nullable K
pollLast()
boolean
remove(@Nullable 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
public @Nullable K lower(K e)
- Specified by:
lower
in interfaceNavigableSet<K extends @Nullable Object>
-
floor
public @Nullable K floor(K e)
- Specified by:
floor
in interfaceNavigableSet<K extends @Nullable Object>
-
ceiling
public @Nullable K ceiling(K e)
- Specified by:
ceiling
in interfaceNavigableSet<K extends @Nullable Object>
-
higher
public @Nullable K higher(K e)
- Specified by:
higher
in interfaceNavigableSet<K extends @Nullable Object>
-
pollFirst
public @Nullable K pollFirst()
- Specified by:
pollFirst
in interfaceNavigableSet<K extends @Nullable Object>
-
pollLast
public @Nullable 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
public @Nullable 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()
- Specified by:
size
in interfaceCollection<K extends @Nullable Object>
- Specified by:
size
in interfaceSet<K extends @Nullable Object>
- Specified by:
size
in classAbstractCollection<K extends @Nullable Object>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<K extends @Nullable Object>
- Specified by:
isEmpty
in interfaceSet<K extends @Nullable Object>
- Overrides:
isEmpty
in classAbstractCollection<K extends @Nullable Object>
-
contains
public boolean contains(@Nullable Object o)
- Specified by:
contains
in interfaceCollection<K extends @Nullable Object>
- Specified by:
contains
in interfaceSet<K extends @Nullable Object>
- Overrides:
contains
in classAbstractCollection<K extends @Nullable Object>
-
remove
public boolean remove(@Nullable Object o)
- Specified by:
remove
in interfaceCollection<K extends @Nullable Object>
- Specified by:
remove
in interfaceSet<K extends @Nullable Object>
- Overrides:
remove
in classAbstractCollection<K extends @Nullable Object>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<K extends @Nullable Object>
- Specified by:
clear
in interfaceSet<K extends @Nullable Object>
- Overrides:
clear
in classAbstractCollection<K extends @Nullable Object>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<E extends @Nullable Object>
- Specified by:
removeAll
in interfaceSet<E extends @Nullable Object>
- Overrides:
removeAll
in classAbstractSet<E extends @Nullable Object>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<E extends @Nullable Object>
- Specified by:
retainAll
in interfaceSet<E extends @Nullable Object>
- Overrides:
retainAll
in classAbstractCollection<E extends @Nullable Object>
-
-