private class ListMap.Entries extends AbstractSet<Map.Entry<K,V>> implements SortedSet<Map.Entry<K,V>>
ListMap.entrySet().
Like base class AbstractSet,
this class supports neither Set.add(Object)
nor Set.addAll(Collection),
i.e. those methods throw an UnsupportedOperationException.
In contrast, this class supports methods
Set.clear(),
Set.remove(Object),
Set.removeAll(Collection) and
Set.retainAll(Collection).
The iterator returned by iterator()
supports Iterator.remove().
ListMap.entrySet| Modifier | Constructor and Description |
|---|---|
private |
Entries() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears actually the enclosing
ListMap
delegating to ListMap.clear(). |
Comparator<? super Map.Entry<K,V>> |
comparator() |
boolean |
contains(Object obj)
Returns actually whether
obj
is an instance of Map.Entry
with a key contained in the enclosing ListMap
delegating to ListMap.containsKey(Object). |
Map.Entry<K,V> |
first() |
private Object |
getKey(Object obj)
Assumes that
obj is a Map.Entry
and returns its key. |
SortedSet<Map.Entry<K,V>> |
headSet(Map.Entry<K,V> toElement) |
Iterator<Map.Entry<K,V>> |
iterator()
Returns actually an instance of
ListMap.EntriesIterator. |
private Map.Entry<K,V> |
key2entry(K key) |
Map.Entry<K,V> |
last() |
boolean |
remove(Object obj)
Removes
obj from the entry set if present
and returns whether it was present. |
int |
size()
Returns actually the size of the enclosing
ListMap
delegating to ListMap.size(). |
SortedSet<Map.Entry<K,V>> |
subSet(Map.Entry<K,V> fromElement,
Map.Entry<K,V> toElement) |
SortedSet<Map.Entry<K,V>> |
tailSet(Map.Entry<K,V> fromElement) |
equals, hashCode, removeAlladd, addAll, containsAll, isEmpty, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratoradd, addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArrayparallelStream, removeIf, streampublic Iterator<Map.Entry<K,V>> iterator()
ListMap.EntriesIterator.public int size()
ListMap
delegating to ListMap.size().private Object getKey(Object obj)
obj is a Map.Entry
and returns its key.NullPointerException - if obj is null.ClassCastException - if obj is neither null
nor an instance of Map.Entry.public boolean contains(Object obj)
obj
is an instance of Map.Entry
with a key contained in the enclosing ListMap
delegating to ListMap.containsKey(Object).public boolean remove(Object obj)
obj from the entry set if present
and returns whether it was present.
Effectively checks whether obj
is an instance of Map.Entry.
If not returns false.
If it is an instance of Map.Entry
removes the according key-value pair
from the enclosing ListMap if present.
Returns whether obj's key was present
when invoking this method.
This is done
invoking ListMap.Keys.remove(Object).public void clear()
ListMap
delegating to ListMap.clear().public Comparator<? super Map.Entry<K,V>> comparator()
comparator in interface SortedSet<Map.Entry<K,V>>public SortedSet<Map.Entry<K,V>> subSet(Map.Entry<K,V> fromElement, Map.Entry<K,V> toElement)
Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.