Package com.google.common.collect
Class ForwardingMap.StandardValues
- java.lang.Object
-
- java.util.AbstractCollection<V>
-
- com.google.common.collect.ForwardingMap.StandardValues
-
- All Implemented Interfaces:
Iterable<V>,Collection<V>
- Enclosing class:
- ForwardingMap<K extends @Nullable Object,V extends @Nullable Object>
protected class ForwardingMap.StandardValues extends AbstractCollection<V>
A sensible implementation ofMap.values()in terms of the following methods:ForwardingMap.clear(),ForwardingMap.containsValue(java.lang.Object),ForwardingMap.isEmpty(),ForwardingMap.size(), and theSet.iterator()method ofForwardingMap.entrySet(). In many cases, you may wish to overrideForwardingMap.values()to forward to this implementation or a subclass thereof.- Since:
- 10.0
-
-
Constructor Summary
Constructors Constructor Description StandardValues()Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontains(@Nullable Object o)booleanisEmpty()Iterator<V>iterator()booleanremove(@Nullable Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()-
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 Detail
-
StandardValues
public StandardValues()
Constructor for use by subclasses.
-
-
Method Detail
-
iterator
public Iterator<V> iterator()
- Specified by:
iteratorin interfaceCollection<K extends @Nullable Object>- Specified by:
iteratorin interfaceIterable<K extends @Nullable Object>- Specified by:
iteratorin classAbstractCollection<V extends @Nullable Object>
-
remove
public boolean remove(@Nullable Object o)
- Specified by:
removein interfaceCollection<K extends @Nullable Object>- Overrides:
removein classAbstractCollection<V extends @Nullable Object>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<K extends @Nullable Object>- Overrides:
removeAllin classAbstractCollection<V extends @Nullable Object>
-
retainAll
public boolean retainAll(Collection<?> c)
- 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
public boolean contains(@Nullable Object o)
- 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>
-
-