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(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
Modifier and TypeMethodDescriptionfinal voidclear()final booleanvoidfinal booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) final intsize()Methods inherited from class AbstractCollection
add, addAll, containsAll, toArray, toArray, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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 final int size()- Specified by:
sizein interfaceCollection<K extends @Nullable Object>- Specified by:
sizein classAbstractCollection<V extends @Nullable Object>
-
isEmpty
public final 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 final void clear()- Specified by:
clearin interfaceCollection<K extends @Nullable Object>- Overrides:
clearin classAbstractCollection<V extends @Nullable Object>
-