public abstract static class ReferenceCollections.EmptyCollection<K> extends AbstractReferenceCollection<K>
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends K> c) |
void |
clear() |
boolean |
contains(java.lang.Object k) |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
ObjectBidirectionalIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
toStringadd, containsAll, isEmpty, remove, toArraypublic boolean contains(java.lang.Object k)
public java.lang.Object[] toArray()
public ObjectBidirectionalIterator<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 ObjectIterable<K>iterator in interface ReferenceCollection<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in class AbstractReferenceCollection<K>Iterable.iterator()public int size()
public void clear()
public int hashCode()
hashCode in interface java.util.Collection<K>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<K>equals in class java.lang.Objectpublic boolean addAll(java.util.Collection<? extends K> c)
public boolean removeAll(java.util.Collection<?> c)