Package eu.simuline.util
Class ListMap.Keys
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<K>
-
- eu.simuline.util.ListMap.Keys
-
- All Implemented Interfaces:
java.lang.Iterable<K>,java.util.Collection<K>,java.util.Set<K>,java.util.SortedSet<K>
private class ListMap.Keys extends java.util.AbstractSet<K> implements java.util.SortedSet<K>Represents the key set of the enclosing map given byListMap.keySet().Like base class
AbstractSet, this class supports neitherSet.add(Object)norSet.addAll(Collection), i.e. those methods throw anUnsupportedOperationException. In contrast, this class supports methodsSet.clear(),Set.remove(Object),Set.removeAll(Collection)andSet.retainAll(Collection). The iterator returned byiterator()supportsIterator.remove().- See Also:
ListMap.keysSet
-
-
Constructor Summary
Constructors Modifier Constructor Description privateKeys()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears actually the enclosingListMapdelegating toListMap.clear().java.util.Comparator<? super K>comparator()booleancontains(java.lang.Object obj)Returns actually whetherobjis a key of the enclosingListMapdelegating toListMap.containsKey(Object).Kfirst()java.util.SortedSet<K>headSet(K toElement)java.util.Iterator<K>iterator()Returns actually an instance ofListMap.KeysIterator.Klast()booleanremove(java.lang.Object obj)Interpretesobjas key of the enclosingListMapand removes the according key-value pair if present.intsize()Returns actually the size of the enclosingListMapdelegating toListMap.size().java.util.SortedSet<K>subSet(K fromElement, K toElement)java.util.SortedSet<K>tailSet(K fromElement)-
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
iterator
public java.util.Iterator<K> iterator()
Returns actually an instance ofListMap.KeysIterator.
-
size
public int size()
Returns actually the size of the enclosingListMapdelegating toListMap.size().
-
contains
public boolean contains(java.lang.Object obj)
Returns actually whetherobjis a key of the enclosingListMapdelegating toListMap.containsKey(Object).
-
remove
public boolean remove(java.lang.Object obj)
Interpretesobjas key of the enclosingListMapand removes the according key-value pair if present. Returns whether the according key-value pair was present when invoking this method usingListMap.removeIdx(int).
-
clear
public void clear()
Clears actually the enclosingListMapdelegating toListMap.clear().
-
comparator
public java.util.Comparator<? super K> comparator()
- Specified by:
comparatorin interfacejava.util.SortedSet<K>
-
subSet
public java.util.SortedSet<K> subSet(K fromElement, K toElement)
- Specified by:
subSetin interfacejava.util.SortedSet<K>
-
headSet
public java.util.SortedSet<K> headSet(K toElement)
- Specified by:
headSetin interfacejava.util.SortedSet<K>
-
-