Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.set.mutable.primitive

public Class DoubleHashSet

extends AbstractDoubleSet
implements MutableDoubleSet, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.set.primitive.MutableDoubleSet, org.eclipse.collections.api.set.primitive.DoubleSet, org.eclipse.collections.api.DoubleIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Arrays, .Collection, .NoSuchElementException, org.eclipse.collections.api.DoubleIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.DoubleToObjectFunction, .ObjectDoubleToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.DoublePredicate, org.eclipse.collections.api.block.procedure.primitive.DoubleProcedure, org.eclipse.collections.api.collection.primitive.MutableDoubleCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.DoubleSets, org.eclipse.collections.api.iterator.DoubleIterator, .MutableDoubleIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.set.ImmutableSet, .MutableSet, org.eclipse.collections.api.set.primitive.ImmutableDoubleSet, .MutableDoubleSet, .DoubleSet, org.eclipse.collections.impl.set.immutable.primitive.ImmutableDoubleSetSerializationProxy, .AbstractImmutableDoubleSet, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.set.primitive.AbstractDoubleSet

This file was automatically generated from template file primitiveHashSet.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class

Field Summary

Modifier and TypeField and Description
private static final int
private transient boolean
private static final int
private static final double
private static final int
private static final int
private int
private int
private static final double
private static final long
private double[]
private int
private int

Constructor Summary

AccessConstructor and Description
public
public
DoubleHashSet(int initialCapacity)

public
DoubleHashSet(double... elements)

public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
protected void
allocateTable(int sizeToAllocate)

public boolean
allSatisfy(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.allSatisfy.

Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.anySatisfy.

Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public MutableDoubleSet
public MutableDoubleSet
public MutableSet<Double>
public RichIterable<DoubleIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.DoubleIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableSet<V>
collect(DoubleToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.set.primitive.MutableDoubleSet.collect, org.eclipse.collections.api.set.primitive.DoubleSet.collect, org.eclipse.collections.api.DoubleIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(DoubleToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.collect.

Same as collect(DoubleToObjectFunction) , only the results are added to the target Collection.

public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

public boolean
contains(double value)

Implements org.eclipse.collections.api.DoubleIterable.contains.

Returns true if the value is contained in the DoubleIterable, and false if it is not.

private void
public int
count(DoublePredicate predicate)

Implements org.eclipse.collections.api.DoubleIterable.count.

Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.

public double
public MutableDoubleIterator
doubleIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.doubleIterator, org.eclipse.collections.api.DoubleIterable.doubleIterator.

Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.

public void
each(DoubleProcedure procedure)

Implements org.eclipse.collections.api.DoubleIterable.each.

A synonym for forEach.

public DoubleSet
public int
public <T> T
injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.DoubleIterable.injectInto.

private static boolean
private static boolean
isNonSentinel(double value)

private int
mask(int spread)

public double
private int
public double
public DoubleHashSet
newEmpty()

Overrides default org.eclipse.collections.api.set.primitive.MutableDoubleSet.newEmpty.

Creates a new empty DoubleHashSet.

public static DoubleHashSet
public static DoubleHashSet
newSetWith(double... source)

pack-priv int
probe(double element)

pack-priv int
probeThree(double element, int removedIndex)

pack-priv int
probeTwo(double element, int removedIndex)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public DoubleHashSet
reject(DoublePredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableDoubleSet.reject, org.eclipse.collections.api.set.primitive.DoubleSet.reject, org.eclipse.collections.api.DoubleIterable.reject.

Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.

public <R extends MutableDoubleCollection> R
reject(DoublePredicate predicate, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.reject.

Same as reject(DoublePredicate) , only the results are added to the target MutableDoubleCollection.

public boolean
public boolean
public boolean
private boolean
removeZeroToThirtyOne(double value)

public boolean
public boolean
public DoubleHashSet
select(DoublePredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableDoubleSet.select, org.eclipse.collections.api.set.primitive.DoubleSet.select, org.eclipse.collections.api.DoubleIterable.select.

Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.

public <R extends MutableDoubleCollection> R
select(DoublePredicate predicate, R target)

Overrides default org.eclipse.collections.api.DoubleIterable.select.

Same as select(DoublePredicate) , only the results are added to the target MutableDoubleCollection.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(double element)

pack-priv int
spreadTwoAndMask(double element)

public double
public double[]
toArray()

Implements org.eclipse.collections.api.DoubleIterable.toArray.

Converts the DoubleIterable to a primitive double array.

public double[]
toArray(double[] array)

Overrides default org.eclipse.collections.api.DoubleIterable.toArray.

Converts the DoubleIterable to a primitive double array.

public ImmutableDoubleSet
public boolean
public DoubleHashSet
public DoubleHashSet
public DoubleHashSet
public DoubleHashSet
public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.set.primitive.AbstractDoubleSet:
cartesianProductequals