Package com.google.common.collect
Class ForwardingMap.StandardValues
- java.lang.Object
-
- java.util.AbstractCollection<V>
-
- com.google.common.collect.ForwardingMap.StandardValues
-
- All Implemented Interfaces:
java.lang.Iterable<V>,java.util.Collection<V>
- Enclosing class:
- ForwardingMap<K,V>
@Beta protected class ForwardingMap.StandardValues extends java.util.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(java.lang.Object o)booleanisEmpty()java.util.Iterator<V>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.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
-
-
-
-
Method Detail
-
iterator
public java.util.Iterator<V> iterator()
- Specified by:
iteratorin interfacejava.util.Collection<K>- Specified by:
iteratorin interfacejava.lang.Iterable<K>- Specified by:
iteratorin classjava.util.AbstractCollection<V>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<K>- Overrides:
removein classjava.util.AbstractCollection<V>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<K>- Overrides:
removeAllin classjava.util.AbstractCollection<V>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<K>- Overrides:
retainAllin classjava.util.AbstractCollection<V>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<K>- Specified by:
sizein classjava.util.AbstractCollection<V>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<K>- Overrides:
isEmptyin classjava.util.AbstractCollection<V>
-
contains
public boolean contains(@Nullable java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<K>- Overrides:
containsin classjava.util.AbstractCollection<V>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<K>- Overrides:
clearin classjava.util.AbstractCollection<V>
-
-