public interface DoubleSet
extends it.unimi.dsi.fastutil.doubles.DoubleCollection, java.util.Set<java.lang.Double>
Set; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
Set| Modifier and Type | Method and Description |
|---|---|
default boolean |
add(java.lang.Double o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
contains(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
it.unimi.dsi.fastutil.doubles.DoubleIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
static DoubleSet |
of()
Returns an immutable empty set.
|
static DoubleSet |
of(double... a)
Returns an immutable list with the elements given.
|
static DoubleSet |
of(double e)
Returns an immutable set with the element given.
|
static DoubleSet |
of(double e0,
double e1)
Returns an immutable set with the elements given.
|
static DoubleSet |
of(double e0,
double e1,
double e2)
Returns an immutable set with the elements given.
|
default boolean |
rem(double k)
Deprecated.
Please use
remove() instead. |
boolean |
remove(double k)
Removes an element from this set.
|
default boolean |
remove(java.lang.Object o)
Deprecated.
Please use the corresponding type-specific method instead.
|
default it.unimi.dsi.fastutil.doubles.DoubleSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this set.
|
add, addAll, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toDoubleArray, toDoubleArrayit.unimi.dsi.fastutil.doubles.DoubleIterator iterator()
iterator in interface java.util.Collection<java.lang.Double>iterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollectioniterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterableiterator in interface java.lang.Iterable<java.lang.Double>iterator in interface java.util.Set<java.lang.Double>default it.unimi.dsi.fastutil.doubles.DoubleSpliterator spliterator()
Set spliterators must report at least Spliterator.DISTINCT.
See Set.spliterator() for more documentation on the requirements
of the returned spliterator.
spliterator in interface java.util.Collection<java.lang.Double>spliterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollectionspliterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterablespliterator in interface java.lang.Iterable<java.lang.Double>spliterator in interface java.util.Set<java.lang.Double>boolean remove(double k)
Collection.remove(Object)@Deprecated default boolean remove(java.lang.Object o)
remove in interface java.util.Collection<java.lang.Double>remove in interface it.unimi.dsi.fastutil.doubles.DoubleCollectionremove in interface java.util.Set<java.lang.Double>@Deprecated default boolean add(java.lang.Double o)
add in interface java.util.Collection<java.lang.Double>add in interface it.unimi.dsi.fastutil.doubles.DoubleCollectionadd in interface java.util.Set<java.lang.Double>@Deprecated default boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Double>contains in interface it.unimi.dsi.fastutil.doubles.DoubleCollectioncontains in interface java.util.Set<java.lang.Double>@Deprecated default boolean rem(double k)
remove() instead.This method is inherited from the type-specific collection this
type-specific set is based on, but it should not used as
this interface reinstates remove() as removal method.
rem in interface it.unimi.dsi.fastutil.doubles.DoubleCollectionstatic DoubleSet of()
static DoubleSet of(double e)
e - an element.e.static DoubleSet of(double e0, double e1)
e0 - the first element.e1 - the second element.e0 and e1.java.lang.IllegalArgumentException - if there were duplicate entries.static DoubleSet of(double e0, double e1, double e2)
e0 - the first element.e1 - the second element.e2 - the third element.e0, e1, and e2.java.lang.IllegalArgumentException - if there were duplicate entries.static DoubleSet of(double... a)
a - the list of elements that will be in the final set.a.java.lang.IllegalArgumentException - if there are any duplicate entries.