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
Constructors -
Method Summary
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
removein interfaceCollection<K extends @Nullable Object>- Overrides:
removein classAbstractCollection<V extends @Nullable Object>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K extends @Nullable Object>- Overrides:
removeAllin classAbstractCollection<V extends @Nullable Object>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K extends @Nullable Object>- Overrides:
retainAllin classAbstractCollection<V extends @Nullable Object>
-
size
public int size()- Specified by:
sizein interfaceCollection<K extends @Nullable Object>- Specified by:
sizein classAbstractCollection<V extends @Nullable Object>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K extends @Nullable Object>- Overrides:
isEmptyin classAbstractCollection<V extends @Nullable Object>
-
contains
- Specified by:
containsin interfaceCollection<K extends @Nullable Object>- Overrides:
containsin classAbstractCollection<V extends @Nullable Object>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K extends @Nullable Object>- Overrides:
clearin classAbstractCollection<V extends @Nullable Object>
-