Package com.google.common.collect
Class ForwardingMap.StandardEntrySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- com.google.common.collect.ForwardingMap.StandardEntrySet
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>
,java.util.Collection<java.util.Map.Entry<K,V>>
,java.util.Set<java.util.Map.Entry<K,V>>
- Enclosing class:
- ForwardingMap<K,V>
@Beta protected abstract class ForwardingMap.StandardEntrySet extends java.util.AbstractSet<E>
A sensible implementation ofMap.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)
, andForwardingMap.size()
. In many cases, you may wish to overrideForwardingMap.entrySet()
to forward to this implementation or a subclass thereof.- Since:
- 10.0
-
-
Constructor Summary
Constructors Constructor Description StandardEntrySet()
Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
contains(java.lang.Object o)
boolean
isEmpty()
boolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
retainAll(java.util.Collection<?> c)
int
size()
-
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, iterator, toArray, toArray, toString
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<K>
- Specified by:
size
in interfacejava.util.Set<K>
- Specified by:
size
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<K>
- Specified by:
clear
in interfacejava.util.Set<K>
- Overrides:
clear
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<K>
- Specified by:
contains
in interfacejava.util.Set<K>
- Overrides:
contains
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<K>
- Specified by:
isEmpty
in interfacejava.util.Set<K>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<K>
- Specified by:
remove
in interfacejava.util.Set<K>
- Overrides:
remove
in classjava.util.AbstractCollection<java.util.Map.Entry<K,V>>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<K>
- Specified by:
removeAll
in interfacejava.util.Set<K>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<K>
- Specified by:
retainAll
in interfacejava.util.Set<K>
-
-