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>
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 void
clear()
boolean
contains(Object o)
boolean
isEmpty()
Iterator<V>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
-
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()
-
remove
public boolean remove(@CheckForNull Object o)
- Specified by:
remove
in interfaceCollection<K extends @Nullable Object>
- Overrides:
remove
in classAbstractCollection<V extends @Nullable Object>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<K extends @Nullable Object>
- Overrides:
removeAll
in classAbstractCollection<V extends @Nullable Object>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<K extends @Nullable Object>
- Overrides:
retainAll
in classAbstractCollection<V extends @Nullable Object>
-
size
public int size()
- Specified by:
size
in interfaceCollection<K extends @Nullable Object>
- Specified by:
size
in classAbstractCollection<V extends @Nullable Object>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<K extends @Nullable Object>
- Overrides:
isEmpty
in classAbstractCollection<V extends @Nullable Object>
-
contains
public boolean contains(@CheckForNull Object o)
- Specified by:
contains
in interfaceCollection<K extends @Nullable Object>
- Overrides:
contains
in classAbstractCollection<V extends @Nullable Object>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<K extends @Nullable Object>
- Overrides:
clear
in classAbstractCollection<V extends @Nullable Object>
-
-