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:
java.lang.Iterable<K>,java.util.Collection<K>,java.util.Set<K>,java.util.SortedSet<K>
- Enclosing class:
- ForwardingSortedMap<K,V>
@Beta protected class ForwardingSortedMap.StandardKeySet extends java.util.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()java.util.Comparator<? super K>comparator()booleancontains(java.lang.Object o)Kfirst()java.util.SortedSet<K>headSet(K toElement)booleanisEmpty()java.util.Iterator<K>iterator()Klast()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.util.SortedSet<K>subSet(K fromElement, K toElement)java.util.SortedSet<K>tailSet(K fromElement)-
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
-
-
-
-
Method Detail
-
comparator
public java.util.Comparator<? super K> comparator()
- Specified by:
comparatorin interfacejava.util.SortedSet<K>
-
subSet
public java.util.SortedSet<K> subSet(K fromElement, K toElement)- Specified by:
subSetin interfacejava.util.SortedSet<K>
-
headSet
public java.util.SortedSet<K> headSet(K toElement)
- Specified by:
headSetin interfacejava.util.SortedSet<K>
-
tailSet
public java.util.SortedSet<K> tailSet(K fromElement)
- Specified by:
tailSetin interfacejava.util.SortedSet<K>
-
first
public K first()
- Specified by:
firstin interfacejava.util.SortedSet<K>
-
last
public K last()
- Specified by:
lastin interfacejava.util.SortedSet<K>
-
iterator
public java.util.Iterator<K> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<K>- Specified by:
iteratorin interfacejava.lang.Iterable<K>- Specified by:
iteratorin interfacejava.util.Set<K>- Specified by:
iteratorin classjava.util.AbstractCollection<K>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<K>- Specified by:
sizein interfacejava.util.Set<K>- Specified by:
sizein classjava.util.AbstractCollection<K>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<K>- Specified by:
isEmptyin interfacejava.util.Set<K>- Overrides:
isEmptyin classjava.util.AbstractCollection<K>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<K>- Specified by:
containsin interfacejava.util.Set<K>- Overrides:
containsin classjava.util.AbstractCollection<K>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<K>- Specified by:
removein interfacejava.util.Set<K>- Overrides:
removein classjava.util.AbstractCollection<K>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<K>- Specified by:
clearin interfacejava.util.Set<K>- Overrides:
clearin classjava.util.AbstractCollection<K>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<E>- Specified by:
removeAllin interfacejava.util.Set<E>- Overrides:
removeAllin classjava.util.AbstractSet<E>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<E>- Specified by:
retainAllin interfacejava.util.Set<E>- Overrides:
retainAllin classjava.util.AbstractCollection<E>
-
-