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,
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, 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 Details
-
StandardValues
public StandardValues()Constructor for use by subclasses.
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceCollection<K>
- Specified by:
iterator
in interfaceIterable<K>
- Specified by:
iterator
in classAbstractCollection<V>
-
remove
- Specified by:
remove
in interfaceCollection<K>
- Overrides:
remove
in classAbstractCollection<V>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<K>
- Overrides:
removeAll
in classAbstractCollection<V>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<K>
- Overrides:
retainAll
in classAbstractCollection<V>
-
size
public int size()- Specified by:
size
in interfaceCollection<K>
- Specified by:
size
in classAbstractCollection<V>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<K>
- Overrides:
isEmpty
in classAbstractCollection<V>
-
contains
- Specified by:
contains
in interfaceCollection<K>
- Overrides:
contains
in classAbstractCollection<V>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<K>
- Overrides:
clear
in classAbstractCollection<V>
-