public final class PropMap.KeySet<S> extends AbstractSet<S> implements Set<S>
PropMap's keys.KeySet object always mirrors (1:1) the
enclosing PropMap's state. For that reason on will get just one
(pseudo singleton per PropMap) PropMap.KeySet object no
matter how many are requested.AbstractCollection.add(Object)
AbstractCollection.addAll(java.util.Collection),
AbstractCollection.retainAll(java.util.Collection),
AbstractCollection.toArray(Object[]) and
AbstractSet.removeAll(java.util.Collection)
are unchanged inheritance.PropMapMap.size(),
PropMap.size()| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object key)
Add a new entry (key, null).
|
void |
clear()
Delete all keys.
|
boolean |
contains(Object o)
Is an object (as key) contained.
|
boolean |
equals(Object other)
Equality with other object.
|
int |
hashCode()
HashCode (of the
PropMap). |
boolean |
isEmpty()
Is the map empty.
|
Iterator<S> |
iterator()
An Iterator over all keys.
|
boolean |
remove(Object o)
Remove a key.
|
int |
size()
Number of keys.
|
Object[] |
toArray()
The keys as array.
|
removeAlladdAll, containsAll, retainAll, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, removeAll, retainAll, spliterator, toArrayparallelStream, removeIf, streampublic int size()
size in interface Collection<S>size in interface Set<S>size in class AbstractCollection<S>PropMap.size()Map.size()public int hashCode()
PropMap). hashCode in interface Collection<S>hashCode in interface Set<S>hashCode in class AbstractSet<S>public boolean equals(Object other)
Strings respectively
CharSequences as set.Set, if its
size is not equal to the enclosing PropMap or if it contains
anything that is not a CharSequence.equals in interface Collection<S>equals in interface Set<S>equals in class AbstractSet<S>public final boolean isEmpty()
isEmpty in interface Collection<S>isEmpty in interface Set<S>isEmpty in class AbstractCollection<S>AbstractCollection.isEmpty()public Object[] toArray()
PropMap.
It is dense (contains no null) and is of the actual
size.toArray in interface Collection<S>toArray in interface Set<S>toArray in class AbstractCollection<S>AbstractCollection.toArray()public boolean contains(Object o)
CharSequence
and is equal to an existing key.contains in interface Collection<S>contains in interface Set<S>contains in class AbstractCollection<S>AbstractCollection.contains(java.lang.Object)public void clear()
PropMap object
(by just calling clear()).clear in interface Collection<S>clear in interface Set<S>clear in class AbstractCollection<S>AbstractCollection.clear(),
PropMap.clear()public boolean add(Object key)
PropMap did not yet contain an entry with
key, it is (in the end by
add(key, null)) newly generated
and true is returned. This only happens if key is accordance with
PropMap's contract.key), it is left unchanged and false is
returned.add in interface Collection<S>add in interface Set<S>add in class AbstractCollection<S>key - the key of the new entryClassCastException - if type or value of key violates
the contract.PropMap.add(CharSequence, CharSequence),
AbstractCollection.add(java.lang.Object)public boolean remove(Object o)
remove in interface Collection<S>remove in interface Set<S>remove in class AbstractCollection<S>o - the key of the entry to be removedAbstractCollection.remove(java.lang.Object)