com.google.common.collect
Class ForwardingMap.StandardEntrySet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<Map.Entry<K,V>>
com.google.common.collect.ForwardingMap.StandardEntrySet
- All Implemented Interfaces:
- Iterable<Map.Entry<K,V>>, Collection<Map.Entry<K,V>>, Set<Map.Entry<K,V>>
- Enclosing class:
- ForwardingMap<K,V>
@Beta
protected abstract class ForwardingMap.StandardEntrySet
- extends AbstractSet<Map.Entry<K,V>>
A sensible implementation of Map.entrySet()
in terms of the following
methods: ForwardingMap.clear()
, ForwardingMap.containsKey(java.lang.Object)
,
ForwardingMap.get(java.lang.Object)
, ForwardingMap.isEmpty()
, ForwardingMap.remove(java.lang.Object)
, and ForwardingMap.size()
. In many cases, you
may wish to override ForwardingMap.entrySet()
to forward to this implementation
or a subclass thereof.
- Since:
- 10.0
ForwardingMap.StandardEntrySet
public ForwardingMap.StandardEntrySet()
size
public int size()
- Specified by:
size
in interface Collection<Map.Entry<K,V>>
- Specified by:
size
in interface Set<Map.Entry<K,V>>
- Specified by:
size
in class AbstractCollection<Map.Entry<K,V>>
clear
public void clear()
- Specified by:
clear
in interface Collection<Map.Entry<K,V>>
- Specified by:
clear
in interface Set<Map.Entry<K,V>>
- Overrides:
clear
in class AbstractCollection<Map.Entry<K,V>>
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<Map.Entry<K,V>>
- Specified by:
contains
in interface Set<Map.Entry<K,V>>
- Overrides:
contains
in class AbstractCollection<Map.Entry<K,V>>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection<Map.Entry<K,V>>
- Specified by:
isEmpty
in interface Set<Map.Entry<K,V>>
- Overrides:
isEmpty
in class AbstractCollection<Map.Entry<K,V>>
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection<Map.Entry<K,V>>
- Specified by:
remove
in interface Set<Map.Entry<K,V>>
- Overrides:
remove
in class AbstractCollection<Map.Entry<K,V>>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interface Collection<Map.Entry<K,V>>
- Specified by:
removeAll
in interface Set<Map.Entry<K,V>>
- Overrides:
removeAll
in class AbstractSet<Map.Entry<K,V>>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interface Collection<Map.Entry<K,V>>
- Specified by:
retainAll
in interface Set<Map.Entry<K,V>>
- Overrides:
retainAll
in class AbstractCollection<Map.Entry<K,V>>
Copyright © 2010-2012. All Rights Reserved.