@Beta protected class ForwardingMap.StandardValues extends AbstractCollection<V>
A sensible implementation of Map.values()
in terms of the following methods: ForwardingMap.clear()
, ForwardingMap.containsValue(java.lang.Object)
, ForwardingMap.isEmpty()
, ForwardingMap.size()
, and the Set.iterator()
method of ForwardingMap.entrySet()
. In many cases, you may wish to override ForwardingMap.values()
to forward to this implementation or a subclass thereof.
Constructor and Description |
---|
StandardValues()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(Object o) |
boolean |
isEmpty() |
Iterator<V> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
add, addAll, containsAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
public Iterator<V> iterator()
iterator
in interface Iterable<V>
iterator
in interface Collection<V>
iterator
in class AbstractCollection<V>
public boolean remove(Object o)
remove
in interface Collection<V>
remove
in class AbstractCollection<V>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<V>
removeAll
in class AbstractCollection<V>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<V>
retainAll
in class AbstractCollection<V>
public int size()
size
in interface Collection<V>
size
in class AbstractCollection<V>
public boolean isEmpty()
isEmpty
in interface Collection<V>
isEmpty
in class AbstractCollection<V>
public boolean contains(@Nullable Object o)
contains
in interface Collection<V>
contains
in class AbstractCollection<V>
public void clear()
clear
in interface Collection<V>
clear
in class AbstractCollection<V>