public static class ObjectSets.Singleton<K> extends AbstractObjectSet<K> implements java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific set.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends K> c) |
java.lang.Object |
clone() |
boolean |
contains(java.lang.Object k) |
ObjectListIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
remove(java.lang.Object k) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
equals, hashCodetoStringadd, clear, containsAll, isEmpty, toArray, toArraypublic boolean contains(java.lang.Object k)
public boolean remove(java.lang.Object k)
public ObjectListIterator<K> iterator()
ObjectCollection
Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in the
corresponding type-specific class, but was weakened by the fact that this
interface extends Collection.
iterator in interface ObjectCollection<K>iterator in interface ObjectIterable<K>iterator in interface ObjectSet<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in interface java.util.Set<K>iterator in class AbstractObjectSet<K>Iterable.iterator()public int size()
public boolean addAll(java.util.Collection<? extends K> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public java.lang.Object clone()
clone in class java.lang.Object