Class ForwardingMap.StandardValues
java.lang.Object
java.util.AbstractCollection<V>
com.google.common.collect.ForwardingMap.StandardValues
- All Implemented Interfaces:
Iterable<V>
,Collection<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.- Since:
- 10.0
- Author:
- Kevin Bourrillion, Jared Levy, Louis Wasserman
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
StandardValues
public StandardValues()Constructor for use by subclasses.
-
-
Method Details
-
iterator
-
forEach
-
remove
- Specified by:
remove
in interfaceCollection<K extends @Nullable Object>
- Overrides:
remove
in classAbstractCollection<V extends @Nullable Object>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<K extends @Nullable Object>
- Overrides:
removeAll
in classAbstractCollection<V extends @Nullable Object>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<K extends @Nullable Object>
- Overrides:
retainAll
in classAbstractCollection<V extends @Nullable Object>
-
size
public int size()- Specified by:
size
in interfaceCollection<K extends @Nullable Object>
- Specified by:
size
in classAbstractCollection<V extends @Nullable Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<K extends @Nullable Object>
- Overrides:
isEmpty
in classAbstractCollection<V extends @Nullable Object>
-
contains
- Specified by:
contains
in interfaceCollection<K extends @Nullable Object>
- Overrides:
contains
in classAbstractCollection<V extends @Nullable Object>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<K extends @Nullable Object>
- Overrides:
clear
in classAbstractCollection<V extends @Nullable Object>
-