java.lang.Object
java.util.AbstractCollection<V>
com.google.common.collect.ForwardingMap.StandardValues
- All Implemented Interfaces:
Iterable<V>,Collection<V>
- Enclosing class:
- ForwardingMap<K,
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
-
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
- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin classAbstractCollection<V>
-
forEach
-
remove
- Specified by:
removein interfaceCollection<K>- Overrides:
removein classAbstractCollection<V>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K>- Overrides:
removeAllin classAbstractCollection<V>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K>- Overrides:
retainAllin classAbstractCollection<V>
-
size
public int size()- Specified by:
sizein interfaceCollection<K>- Specified by:
sizein classAbstractCollection<V>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>- Overrides:
isEmptyin classAbstractCollection<V>
-
contains
- Specified by:
containsin interfaceCollection<K>- Overrides:
containsin classAbstractCollection<V>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K>- Overrides:
clearin classAbstractCollection<V>
-