public abstract static class FloatCollections.EmptyCollection extends AbstractFloatCollection
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.Float> c) |
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this collection.
|
void |
clear() |
boolean |
contains(float k)
Returns
true if this collection contains the specified element. |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAll(FloatCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
it.unimi.dsi.fastutil.doubles.DoubleIterator |
doubleIterator()
Returns a widened primitive iterator on the elements of this collection.
|
it.unimi.dsi.fastutil.doubles.DoubleSpliterator |
doubleSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super java.lang.Float> action)
Deprecated.
|
void |
forEach(it.unimi.dsi.fastutil.floats.FloatConsumer 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() |
FloatBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(FloatCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeIf(FloatPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
Deprecated.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(FloatCollection c)
Retains in this collection only elements from the given type-specific collection.
|
int |
size() |
it.unimi.dsi.fastutil.floats.FloatSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
float[] |
toFloatArray()
Returns a primitive type array containing the items of this collection.
|
float[] |
toFloatArray(float[] a)
Deprecated.
|
add, add, contains, rem, remove, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdoubleParallelStream, doubleStream, parallelStream, removeIf, streamforEachpublic boolean contains(float k)
AbstractFloatCollectiontrue if this collection contains the specified element.contains in interface FloatCollectioncontains in class AbstractFloatCollectionCollection.contains(Object)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>public <T> T[] toArray(T[] array)
toArray in interface java.util.Collection<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>public FloatBidirectionalIterator iterator()
FloatCollectioniterator in interface FloatCollectioniterator in interface FloatIterableiterator in interface java.lang.Iterable<java.lang.Float>iterator in interface java.util.Collection<java.lang.Float>iterator in class AbstractFloatCollectionIterable.iterator()public it.unimi.dsi.fastutil.floats.FloatSpliterator spliterator()
FloatCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Float>size in class java.util.AbstractCollection<java.lang.Float>public void clear()
clear in interface java.util.Collection<java.lang.Float>clear in class java.util.AbstractCollection<java.lang.Float>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Float>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Float>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Float> action)
FloatIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractFloatCollectioncontainsAll in interface java.util.Collection<java.lang.Float>containsAll in class AbstractFloatCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Float> c)
AbstractFloatCollectionaddAll in interface java.util.Collection<java.lang.Float>addAll in class AbstractFloatCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractFloatCollectionremoveAll in interface java.util.Collection<java.lang.Float>removeAll in class AbstractFloatCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractFloatCollectionretainAll in interface java.util.Collection<java.lang.Float>retainAll in class AbstractFloatCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
FloatCollectionpublic float[] toFloatArray()
FloatCollectiontoFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectionCollection.toArray()@Deprecated public float[] toFloatArray(float[] a)
AbstractFloatCollectionNote 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.
toFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public void forEach(it.unimi.dsi.fastutil.floats.FloatConsumer action)
FloatIterableIterable
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(FloatCollection c)
FloatCollectioncontainsAll in interface FloatCollectioncontainsAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(FloatCollection c)
FloatCollectionaddAll in interface FloatCollectionaddAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(FloatCollection c)
FloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(FloatCollection c)
FloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public boolean removeIf(FloatPredicate filter)
FloatCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)public it.unimi.dsi.fastutil.doubles.DoubleIterator doubleIterator()
FloatCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive iterators, of which there are only int, long, and double.
public it.unimi.dsi.fastutil.doubles.DoubleSpliterator doubleSpliterator()
FloatCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int, long, and double.