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 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
| 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 |
ForwardingMap.StandardValues
public ForwardingMap.StandardValues()
iterator
public java.util.Iterator<V> iterator()
- Specified by:
iterator in interface java.lang.Iterable<V>- Specified by:
iterator in interface java.util.Collection<V>- Specified by:
iterator in class java.util.AbstractCollection<V>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove in interface java.util.Collection<V>- Overrides:
remove in class java.util.AbstractCollection<V>
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll in interface java.util.Collection<V>- Overrides:
removeAll in class java.util.AbstractCollection<V>
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll in interface java.util.Collection<V>- Overrides:
retainAll in class java.util.AbstractCollection<V>
size
public int size()
- Specified by:
size in interface java.util.Collection<V>- Specified by:
size in class java.util.AbstractCollection<V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Collection<V>- Overrides:
isEmpty in class java.util.AbstractCollection<V>
contains
public boolean contains(@Nullable
java.lang.Object o)
- Specified by:
contains in interface java.util.Collection<V>- Overrides:
contains in class java.util.AbstractCollection<V>
clear
public void clear()
- Specified by:
clear in interface java.util.Collection<V>- Overrides:
clear in class java.util.AbstractCollection<V>