Package com.google.common.collect
Class ForwardingSortedMap.StandardKeySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- com.google.common.collect.ForwardingSortedMap.StandardKeySet
-
- All Implemented Interfaces:
Iterable<K>,Collection<K>,Set<K>,SortedSet<K>
- Enclosing class:
- ForwardingSortedMap<K extends @Nullable Object,V extends @Nullable Object>
protected class ForwardingSortedMap.StandardKeySet extends AbstractSet<E>
A sensible implementation ofSortedMap.keySet()in terms of the methods ofForwardingSortedMap. In many cases, you may wish to overrideForwardingMap.keySet()to forward to this implementation or a subclass thereof.- Since:
- 15.0
-
-
Constructor Summary
Constructors Constructor Description StandardKeySet()Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()@Nullable Comparator<? super K>comparator()booleancontains(@Nullable Object o)Kfirst()SortedSet<K>headSet(K toElement)booleanisEmpty()Iterator<K>iterator()Klast()booleanremove(@Nullable Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()SortedSet<K>subSet(K fromElement, K toElement)SortedSet<K>tailSet(K fromElement)-
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.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Constructor Detail
-
StandardKeySet
public StandardKeySet()
Constructor for use by subclasses.
-
-
Method Detail
-
comparator
public @Nullable Comparator<? super K> comparator()
- Specified by:
comparatorin interfaceSortedSet<K extends @Nullable Object>
-
subSet
public SortedSet<K> subSet(K fromElement, K toElement)
-
headSet
public SortedSet<K> headSet(K toElement)
-
tailSet
public SortedSet<K> tailSet(K fromElement)
-
iterator
public Iterator<K> iterator()
-
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
public boolean contains(@Nullable Object o)
- Specified by:
containsin interfaceCollection<K extends @Nullable Object>- Specified by:
containsin interfaceSet<K extends @Nullable Object>- Overrides:
containsin classAbstractCollection<K extends @Nullable Object>
-
remove
public boolean remove(@Nullable Object o)
- 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
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<E extends @Nullable Object>- Specified by:
removeAllin interfaceSet<E extends @Nullable Object>- Overrides:
removeAllin classAbstractSet<E extends @Nullable Object>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<E extends @Nullable Object>- Specified by:
retainAllin interfaceSet<E extends @Nullable Object>- Overrides:
retainAllin classAbstractCollection<E extends @Nullable Object>
-
-