@Beta protected class ForwardingSortedMap.StandardKeySet extends AbstractSet<E>
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.
Constructor and Description |
---|
StandardKeySet()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Comparator<? super K> |
comparator() |
boolean |
contains(Object o) |
K |
first() |
SortedSet<K> |
headSet(K toElement) |
boolean |
isEmpty() |
Iterator<K> |
iterator() |
K |
last() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
SortedSet<K> |
subSet(K fromElement,
K toElement) |
SortedSet<K> |
tailSet(K fromElement) |
equals, hashCode
add, addAll, containsAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
parallelStream, removeIf, stream
public Comparator<? super K> comparator()
comparator
in interface SortedSet<K>
public int size()
size
in interface Collection<K>
size
in interface Set<K>
size
in class AbstractCollection<K>
public boolean isEmpty()
isEmpty
in interface Collection<K>
isEmpty
in interface Set<K>
isEmpty
in class AbstractCollection<K>
public boolean contains(Object o)
contains
in interface Collection<K>
contains
in interface Set<K>
contains
in class AbstractCollection<K>
public boolean remove(Object o)
remove
in interface Collection<K>
remove
in interface Set<K>
remove
in class AbstractCollection<K>
public void clear()
clear
in interface Collection<K>
clear
in interface Set<K>
clear
in class AbstractCollection<K>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in class AbstractSet<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
retainAll
in class AbstractCollection<E>