com.google.common.collect
Class ForwardingMap.StandardValues

java.lang.Object
  extended by java.util.AbstractCollection<V>
      extended by com.google.common.collect.ForwardingMap.StandardValues
All Implemented Interfaces:
Iterable<V>, Collection<V>
Enclosing class:
ForwardingMap<K,V>

@Beta
protected class ForwardingMap.StandardValues
extends 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

Constructor Summary
ForwardingMap.StandardValues()
           
 
Method Summary
 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
 

Constructor Detail

ForwardingMap.StandardValues

public ForwardingMap.StandardValues()
Method Detail

iterator

public Iterator<V> iterator()
Specified by:
iterator in interface Iterable<V>
Specified by:
iterator in interface Collection<V>
Specified by:
iterator in class AbstractCollection<V>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<V>
Overrides:
remove in class AbstractCollection<V>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<V>
Overrides:
removeAll in class AbstractCollection<V>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<V>
Overrides:
retainAll in class AbstractCollection<V>

size

public int size()
Specified by:
size in interface Collection<V>
Specified by:
size in class AbstractCollection<V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<V>
Overrides:
isEmpty in class AbstractCollection<V>

contains

public boolean contains(@Nullable
                        Object o)
Specified by:
contains in interface Collection<V>
Overrides:
contains in class AbstractCollection<V>

clear

public void clear()
Specified by:
clear in interface Collection<V>
Overrides:
clear in class AbstractCollection<V>


Copyright © 2010-2011. All Rights Reserved.