public abstract static class ObjectCollections.EmptyCollection<K> extends AbstractObjectCollection<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(Collection<? extends K> c) |
void |
clear() |
boolean |
contains(Object k) |
boolean |
equals(Object o) |
int |
hashCode() |
ObjectBidirectionalIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
toStringadd, containsAll, isEmpty, remove, toArrayadd, containsAll, isEmpty, parallelStream, remove, removeIf, spliterator, stream, toArraypublic boolean contains(Object k)
contains in interface Collection<K>contains in class AbstractCollection<K>public Object[] toArray()
toArray in interface Collection<K>toArray in class AbstractCollection<K>public ObjectBidirectionalIterator<K> iterator()
ObjectCollectionNote 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 Iterable<K>iterator in interface Collection<K>iterator in class AbstractObjectCollection<K>Iterable.iterator()public int size()
size in interface Collection<K>size in class AbstractCollection<K>public void clear()
clear in interface Collection<K>clear in class AbstractCollection<K>public int hashCode()
hashCode in interface Collection<K>hashCode in class Objectpublic boolean equals(Object o)
equals in interface Collection<K>equals in class Objectpublic boolean addAll(Collection<? extends K> c)
addAll in interface Collection<K>addAll in class AbstractCollection<K>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<K>removeAll in class AbstractCollection<K>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<K>retainAll in class AbstractCollection<K>