public abstract static class LongCollections.EmptyCollection extends AbstractLongCollection
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(java.util.Collection<? extends java.lang.Long> c) |
boolean |
addAll(LongCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
boolean |
contains(long k)
Returns
true if this collection contains the specified element. |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAll(LongCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super java.lang.Long> action)
Deprecated.
|
void |
forEach(java.util.function.LongConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
int |
hashCode() |
LongBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(LongCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeIf(java.util.function.LongPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(LongCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
it.unimi.dsi.fastutil.longs.LongSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
long[] |
toLongArray()
Returns a primitive type array containing the items of this collection.
|
long[] |
toLongArray(long[] a)
Deprecated.
|
add, add, contains, forEach, rem, remove, removeIf, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitlongIterator, longParallelStream, longSpliterator, longStream, parallelStream, streampublic boolean contains(long k)
AbstractLongCollectiontrue if this collection contains the specified element.contains in interface LongCollectioncontains in class AbstractLongCollectionCollection.contains(Object)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Long>toArray in class java.util.AbstractCollection<java.lang.Long>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<java.lang.Long>toArray in class java.util.AbstractCollection<java.lang.Long>public LongBidirectionalIterator iterator()
LongCollectioniterator in interface LongCollectioniterator in interface LongIterableiterator in interface java.lang.Iterable<java.lang.Long>iterator in interface java.util.Collection<java.lang.Long>iterator in class AbstractLongCollectionIterable.iterator()public it.unimi.dsi.fastutil.longs.LongSpliterator spliterator()
LongCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Long>size in class java.util.AbstractCollection<java.lang.Long>public void clear()
clear in interface java.util.Collection<java.lang.Long>clear in class java.util.AbstractCollection<java.lang.Long>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Long>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Long>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Long> action)
LongIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractLongCollectioncontainsAll in interface java.util.Collection<java.lang.Long>containsAll in class AbstractLongCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Long> c)
AbstractLongCollectionaddAll in interface java.util.Collection<java.lang.Long>addAll in class AbstractLongCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractLongCollectionremoveAll in interface java.util.Collection<java.lang.Long>removeAll in class AbstractLongCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractLongCollectionretainAll in interface java.util.Collection<java.lang.Long>retainAll in class AbstractLongCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Long> filter)
LongCollectionpublic long[] toLongArray()
LongCollectiontoLongArray in interface LongCollectiontoLongArray in class AbstractLongCollectionCollection.toArray()@Deprecated public long[] toLongArray(long[] a)
AbstractLongCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toLongArray in interface LongCollectiontoLongArray in class AbstractLongCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public void forEach(java.util.function.LongConsumer action)
LongIterableIterable
until all elements have been processed or the action throws an
exception.action - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean containsAll(LongCollection c)
LongCollectioncontainsAll in interface LongCollectioncontainsAll in class AbstractLongCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(LongCollection c)
LongCollectionaddAll in interface LongCollectionaddAll in class AbstractLongCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(LongCollection c)
LongCollectionremoveAll in interface LongCollectionremoveAll in class AbstractLongCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(LongCollection c)
LongCollectionretainAll in interface LongCollectionretainAll in class AbstractLongCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public boolean removeIf(java.util.function.LongPredicate filter)
LongCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)