private class ListMap.Keys extends AbstractSet<K> implements SortedSet<K>
ListMap.keySet().
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.keysSet| Modifier | Constructor and Description |
|---|---|
private |
Keys() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears actually the enclosing
ListMap
delegating to ListMap.clear(). |
Comparator<? super K> |
comparator() |
boolean |
contains(Object obj)
Returns actually whether
obj
is a key of the enclosing ListMap
delegating to ListMap.containsKey(Object). |
K |
first() |
SortedSet<K> |
headSet(K toElement) |
Iterator<K> |
iterator()
Returns actually an instance of
ListMap.KeysIterator. |
K |
last() |
boolean |
remove(Object obj)
Interpretes
obj as key
of the enclosing ListMap
and removes the according key-value pair if present. |
int |
size()
Returns actually the size of the enclosing
ListMap
delegating to ListMap.size(). |
SortedSet<K> |
subSet(K fromElement,
K toElement) |
SortedSet<K> |
tailSet(K 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<K> iterator()
ListMap.KeysIterator.public int size()
ListMap
delegating to ListMap.size().size in interface Collection<K>size in interface Set<K>size in class AbstractCollection<K>public boolean contains(Object obj)
obj
is a key of the enclosing ListMap
delegating to ListMap.containsKey(Object).contains in interface Collection<K>contains in interface Set<K>contains in class AbstractCollection<K>public boolean remove(Object obj)
obj as key
of the enclosing ListMap
and removes the according key-value pair if present.
Returns whether the according key-value pair was present
when invoking this method using
ListMap.removeIdx(int).remove in interface Collection<K>remove in interface Set<K>remove in class AbstractCollection<K>public void clear()
ListMap
delegating to ListMap.clear().clear in interface Collection<K>clear in interface Set<K>clear in class AbstractCollection<K>public Comparator<? super K> comparator()
comparator in interface SortedSet<K>Copyright © 2012–2018 Simuline Organization (l2r). All rights reserved.