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 |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super K> action) |
int |
hashCode() |
ObjectBidirectionalIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(java.util.function.Predicate<? super K> filter) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
ObjectSpliterator<K> |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
toString
public boolean contains(java.lang.Object k)
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] array)
public ObjectBidirectionalIterator<K> iterator()
ReferenceCollection
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 ObjectSpliterator<K> spliterator()
ReferenceCollection
See Collection.spliterator()
for more documentation on the requirements
of the returned spliterator.
public int size()
public void clear()
public int hashCode()
hashCode
in interface java.util.Collection<K>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<K>
equals
in class java.lang.Object
public void forEach(java.util.function.Consumer<? super K> action)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends K> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public boolean removeIf(java.util.function.Predicate<? super K> filter)