Class ForwardingSortedMap.StandardKeySet
java.lang.Object
java.util.AbstractCollection<K>
java.util.AbstractSet<K>
com.google.common.collect.ForwardingSortedMap.StandardKeySet
- All Implemented Interfaces:
Iterable<K>, Collection<K>, SequencedCollection<K>, SequencedSet<K>, Set<K>, SortedSet<K>
- Enclosing class:
ForwardingSortedMap<K extends @Nullable Object, V extends @Nullable Object>
A sensible implementation of
SortedMap.keySet() in terms of the methods of
ForwardingSortedMap. In many cases, you may wish to override ForwardingMap.keySet() to forward to this implementation or a subclass thereof.- Since:
- 15.0
- Author:
- Mike Bostock, Louis Wasserman
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()@Nullable Comparator<? super K> booleanfirst()voidbooleanisEmpty()iterator()last()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Methods inherited from class AbstractSet
equals, hashCodeMethods inherited from class AbstractCollection
add, addAll, containsAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface SortedSet
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed, spliterator
-
Constructor Details
-
StandardKeySet
public StandardKeySet()Constructor for use by subclasses.
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedSet<K extends @Nullable Object>
-
subSet
-
headSet
-
tailSet
-
first
-
last
-
iterator
-
forEach
-
size
public int size()- Specified by:
sizein interfaceCollection<K extends @Nullable Object>- Specified by:
sizein interfaceSet<K extends @Nullable Object>- Specified by:
sizein classAbstractCollection<K extends @Nullable Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K extends @Nullable Object>- Specified by:
isEmptyin interfaceSet<K extends @Nullable Object>- Overrides:
isEmptyin classAbstractCollection<K extends @Nullable Object>
-
contains
- Specified by:
containsin interfaceCollection<K extends @Nullable Object>- Specified by:
containsin interfaceSet<K extends @Nullable Object>- Overrides:
containsin classAbstractCollection<K extends @Nullable Object>
-
remove
- Specified by:
removein interfaceCollection<K extends @Nullable Object>- Specified by:
removein interfaceSet<K extends @Nullable Object>- Overrides:
removein classAbstractCollection<K extends @Nullable Object>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K extends @Nullable Object>- Specified by:
clearin interfaceSet<K extends @Nullable Object>- Overrides:
clearin classAbstractCollection<K extends @Nullable Object>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E extends @Nullable Object>- Specified by:
removeAllin interfaceSet<E extends @Nullable Object>- Overrides:
removeAllin classAbstractSet<E extends @Nullable Object>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E extends @Nullable Object>- Specified by:
retainAllin interfaceSet<E extends @Nullable Object>- Overrides:
retainAllin classAbstractCollection<E extends @Nullable Object>
-