Class DoubleHashSet
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.set.primitive.AbstractDoubleSet
-
- org.eclipse.collections.impl.set.mutable.primitive.DoubleHashSet
-
- All Implemented Interfaces:
Externalizable
,Serializable
,MutableDoubleCollection
,DoubleIterable
,PrimitiveIterable
,DoubleSet
,MutableDoubleSet
public class DoubleHashSet extends AbstractDoubleSet implements MutableDoubleSet, Externalizable
This file was automatically generated from template file primitiveHashSet.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleHashSet()
DoubleHashSet(double... elements)
DoubleHashSet(int initialCapacity)
DoubleHashSet(DoubleIterable elements)
DoubleHashSet(DoubleHashSet set)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractDoubleSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractDoubleIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
asLazy, average, averageIfEmpty, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.DoubleSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
removeIf
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableDoubleSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Constructor Detail
-
DoubleHashSet
public DoubleHashSet()
-
DoubleHashSet
public DoubleHashSet(int initialCapacity)
-
DoubleHashSet
public DoubleHashSet(double... elements)
-
DoubleHashSet
public DoubleHashSet(DoubleIterable elements)
-
DoubleHashSet
public DoubleHashSet(DoubleHashSet set)
-
-
Method Detail
-
boxed
public MutableSet<Double> boxed()
- Specified by:
boxed
in interfaceMutableDoubleSet
-
newSet
public static DoubleHashSet newSet(DoubleIterable source)
-
newSetWith
public static DoubleHashSet newSetWith(double... source)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceDoubleSet
- Specified by:
hashCode
in classAbstractDoubleSet
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
add
public boolean add(double element)
- Specified by:
add
in interfaceMutableDoubleCollection
-
addAll
public boolean addAll(double... source)
- Specified by:
addAll
in interfaceMutableDoubleCollection
-
addAll
public boolean addAll(DoubleIterable source)
- Specified by:
addAll
in interfaceMutableDoubleCollection
-
remove
public boolean remove(double value)
- Specified by:
remove
in interfaceMutableDoubleCollection
-
removeAll
public boolean removeAll(DoubleIterable source)
- Specified by:
removeAll
in interfaceMutableDoubleCollection
-
removeAll
public boolean removeAll(double... source)
- Specified by:
removeAll
in interfaceMutableDoubleCollection
-
retainAll
public boolean retainAll(DoubleIterable source)
- Specified by:
retainAll
in interfaceMutableDoubleCollection
-
retainAll
public boolean retainAll(double... source)
- Specified by:
retainAll
in interfaceMutableDoubleCollection
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableDoubleCollection
-
with
public DoubleHashSet with(double element)
- Specified by:
with
in interfaceMutableDoubleCollection
- Specified by:
with
in interfaceMutableDoubleSet
-
without
public DoubleHashSet without(double element)
- Specified by:
without
in interfaceMutableDoubleCollection
- Specified by:
without
in interfaceMutableDoubleSet
-
withAll
public DoubleHashSet withAll(DoubleIterable elements)
- Specified by:
withAll
in interfaceMutableDoubleCollection
- Specified by:
withAll
in interfaceMutableDoubleSet
-
withoutAll
public DoubleHashSet withoutAll(DoubleIterable elements)
- Specified by:
withoutAll
in interfaceMutableDoubleCollection
- Specified by:
withoutAll
in interfaceMutableDoubleSet
-
asUnmodifiable
public MutableDoubleSet asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableDoubleCollection
- Specified by:
asUnmodifiable
in interfaceMutableDoubleSet
-
asSynchronized
public MutableDoubleSet asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableDoubleCollection
- Specified by:
asSynchronized
in interfaceMutableDoubleSet
-
toImmutable
public ImmutableDoubleSet toImmutable()
- Specified by:
toImmutable
in interfaceDoubleSet
- Specified by:
toImmutable
in interfaceMutableDoubleCollection
- Specified by:
toImmutable
in interfaceMutableDoubleSet
-
doubleIterator
public MutableDoubleIterator doubleIterator()
- Specified by:
doubleIterator
in interfaceDoubleIterable
- Specified by:
doubleIterator
in interfaceMutableDoubleCollection
-
toArray
public double[] toArray()
- Specified by:
toArray
in interfaceDoubleIterable
-
toArray
public double[] toArray(double[] array)
- Specified by:
toArray
in interfaceDoubleIterable
-
contains
public boolean contains(double value)
- Specified by:
contains
in interfaceDoubleIterable
-
each
public void each(DoubleProcedure procedure)
- Specified by:
each
in interfaceDoubleIterable
- Since:
- 7.0.
-
select
public DoubleHashSet select(DoublePredicate predicate)
- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceDoubleSet
- Specified by:
select
in interfaceMutableDoubleCollection
- Specified by:
select
in interfaceMutableDoubleSet
-
select
public <R extends MutableDoubleCollection> R select(DoublePredicate predicate, R target)
- Specified by:
select
in interfaceDoubleIterable
- Since:
- 8.1.
-
reject
public DoubleHashSet reject(DoublePredicate predicate)
- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceDoubleSet
- Specified by:
reject
in interfaceMutableDoubleCollection
- Specified by:
reject
in interfaceMutableDoubleSet
-
reject
public <R extends MutableDoubleCollection> R reject(DoublePredicate predicate, R target)
- Specified by:
reject
in interfaceDoubleIterable
- Since:
- 8.1.
-
collect
public <V> MutableSet<V> collect(DoubleToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceDoubleSet
- Specified by:
collect
in interfaceMutableDoubleCollection
- Specified by:
collect
in interfaceMutableDoubleSet
-
collect
public <V,R extends Collection<V>> R collect(DoubleToObjectFunction<? extends V> function, R target)
- Specified by:
collect
in interfaceDoubleIterable
- Since:
- 8.1.
-
detectIfNone
public double detectIfNone(DoublePredicate predicate, double ifNone)
- Specified by:
detectIfNone
in interfaceDoubleIterable
-
count
public int count(DoublePredicate predicate)
- Specified by:
count
in interfaceDoubleIterable
-
anySatisfy
public boolean anySatisfy(DoublePredicate predicate)
- Specified by:
anySatisfy
in interfaceDoubleIterable
-
allSatisfy
public boolean allSatisfy(DoublePredicate predicate)
- Specified by:
allSatisfy
in interfaceDoubleIterable
-
sum
public double sum()
- Specified by:
sum
in interfaceDoubleIterable
-
max
public double max()
- Specified by:
max
in interfaceDoubleIterable
-
min
public double min()
- Specified by:
min
in interfaceDoubleIterable
-
freeze
public DoubleSet freeze()
- Specified by:
freeze
in interfaceDoubleSet
- Specified by:
freeze
in interfaceMutableDoubleSet
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceDoubleIterable
-
chunk
public RichIterable<DoubleIterable> chunk(int size)
- Specified by:
chunk
in interfaceDoubleIterable
-
newEmpty
public DoubleHashSet newEmpty()
Creates a new empty DoubleHashSet.- Specified by:
newEmpty
in interfaceMutableDoubleCollection
- Specified by:
newEmpty
in interfaceMutableDoubleSet
- Since:
- 9.2.
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
-