public class AbstractKeyBasedMap.EntrySet extends AbstractSet<Map.Entry<K,V>>
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
AbstractKeyBasedMap.EntrySet.Entry |
A Map Entry implementation that defers its value acquisition from
the containing map (via
Map.get(Object)) if the Entry is
constructed with a null value. |
protected class |
AbstractKeyBasedMap.EntrySet.EntrySetIterator |
An Iterator over the EntrySet that is backed by the Map.
|
| Constructor | Description |
|---|---|
EntrySet() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Removes all of the elements from this set of Keys by clearing the
underlying Map.
|
boolean |
contains(Object o) |
Returns true if this collection contains the specified
element.
|
protected Map.Entry<K,V> |
instantiateEntry(K oKey,
V oValue) |
Factory pattern.
|
protected Iterator<Map.Entry<K,V>> |
instantiateIterator() |
Factory pattern.
|
boolean |
isEmpty() |
Returns true if this Set is empty.
|
Iterator<Map.Entry<K,V>> |
iterator() |
Returns an iterator over the elements contained in this collection.
|
boolean |
remove(Object o) |
Removes the specified element from this Set of entries if it is
present by removing the associated entry from the underlying Map.
|
int |
size() |
Returns the number of elements in this collection.
|
equals, hashCode, removeAlladd, addAll, containsAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, containsAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic void clear()
public boolean contains(Object o)
contains in interface Collection<Map.Entry<K,V>>contains in interface Set<Map.Entry<K,V>>contains in class AbstractCollection<Map.Entry<K,V>>o - object to be checked for containment in this collectionpublic boolean isEmpty()
public Iterator<Map.Entry<K,V>> iterator()
iterator in interface Iterable<Map.Entry<K,V>>iterator in interface Collection<Map.Entry<K,V>>iterator in interface Set<Map.Entry<K,V>>iterator in class AbstractCollection<Map.Entry<K,V>>public boolean remove(Object o)
public int size()
protected Map.Entry<K,V> instantiateEntry(K oKey, V oValue)
oKey - the Entry key (required)oValue - the Entry value (optional; lazy loaded if necessary)