ObjectIterable<K>, ReferenceCollection<K>, ReferenceSet<K>, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<K>, java.util.Collection<K>, java.util.Set<K>ReferenceSortedSets.Singletonpublic static class ReferenceSets.Singleton<K> extends AbstractReferenceSet<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 | 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() |
add, clear, containsAll, isEmpty, toArray, toArraytoStringequals, hashCodepublic boolean contains(java.lang.Object k)
public boolean remove(java.lang.Object k)
public ObjectListIterator<K> iterator()
ReferenceCollection
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 java.util.Collection<K>iterator in interface java.lang.Iterable<K>iterator in interface ObjectIterable<K>iterator in interface ReferenceCollection<K>iterator in interface ReferenceSet<K>iterator in interface java.util.Set<K>iterator in class AbstractReferenceSet<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()