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 extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>
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 Modifier Constructor Description protected
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
-
-
-
-
Constructor Detail
-
StandardEntrySet
protected StandardEntrySet()
Constructor for use by subclasses.
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
size
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Specified by:
size
in classjava.util.AbstractCollection<java.util.Map.Entry<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
clear
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Overrides:
clear
in classjava.util.AbstractCollection<java.util.Map.Entry<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>>
-
contains
public boolean contains(@CheckForNull java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
contains
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Overrides:
contains
in classjava.util.AbstractCollection<java.util.Map.Entry<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
isEmpty
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.util.Map.Entry<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>>
-
remove
public boolean remove(@CheckForNull java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<K extends @Nullable java.lang.Object>
- Specified by:
remove
in interfacejava.util.Set<K extends @Nullable java.lang.Object>
- Overrides:
remove
in classjava.util.AbstractCollection<java.util.Map.Entry<K extends @Nullable java.lang.Object,V extends @Nullable java.lang.Object>>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
-