Class ImmutableDoubleMapKeySet
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.set.primitive.AbstractDoubleSet
-
- org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableDoubleSet
-
- org.eclipse.collections.impl.map.mutable.primitive.ImmutableDoubleMapKeySet
-
- All Implemented Interfaces:
java.io.Serializable
,ImmutableDoubleCollection
,DoubleIterable
,PrimitiveIterable
,DoubleSet
,ImmutableDoubleSet
class ImmutableDoubleMapKeySet extends AbstractImmutableDoubleSet implements java.io.Serializable
This file was automatically generated from template file immutablePrimitiveMapKeySet.stg- Since:
- 6.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ImmutableDoubleMapKeySet.InternalDoubleIterator
-
Field Summary
Fields Modifier and Type Field Description private static int
CACHE_LINE_SIZE
private boolean
containsOneKey
private boolean
containsZeroKey
private static double
EMPTY_KEY
private static int
INITIAL_LINEAR_PROBE
private static int
KEY_SIZE
private double[]
keys
private int
occupiedWithData
private static double
REMOVED_KEY
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ImmutableDoubleMapKeySet(double[] keys, int occupiedWithData, boolean containsZeroKey, boolean containsOneKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(DoublePredicate predicate)
Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy(DoublePredicate predicate)
Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.void
appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
Prints a string representation of this collection onto the givenAppendable
.<V> ImmutableSet<V>
collect(DoubleToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains(double value)
Returns true if the value is contained in the DoubleIterable, and false if it is not.int
count(DoublePredicate predicate)
Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.double
detectIfNone(DoublePredicate predicate, double ifNone)
DoubleIterator
doubleIterator()
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.void
each(DoubleProcedure procedure)
A synonym for forEach.void
forEach(DoubleProcedure procedure)
Applies the DoubleProcedure to each element in the DoubleIterable.int
hashCode()
Follows the same general contract asSet.hashCode()
.<T> T
injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
private static boolean
isEmptyKey(double key)
private static boolean
isNonSentinel(double key)
private static boolean
isRemovedKey(double key)
private int
mask(int spread)
double
max()
double
min()
boolean
noneSatisfy(DoublePredicate predicate)
Returns true if none of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.(package private) int
probe(double element)
(package private) int
probeThree(double element, int removedIndex)
(package private) int
probeTwo(double element, int removedIndex)
ImmutableDoubleSet
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.ImmutableDoubleSet
select(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.(package private) int
spreadAndMask(double element)
(package private) int
spreadTwoAndMask(double element)
double
sum()
double[]
toArray()
Converts the DoubleIterable to a primitive double array.double[]
toArray(double[] array)
Converts the DoubleIterable to a primitive double array.private java.lang.Object
writeReplace()
-
Methods inherited from class org.eclipse.collections.impl.set.immutable.primitive.AbstractImmutableDoubleSet
chunk, freeze, newWith, newWithAll, newWithout, newWithoutAll, toImmutable
-
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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, 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.set.primitive.ImmutableDoubleSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
EMPTY_KEY
private static final double EMPTY_KEY
- See Also:
- Constant Field Values
-
REMOVED_KEY
private static final double REMOVED_KEY
- See Also:
- Constant Field Values
-
CACHE_LINE_SIZE
private static final int CACHE_LINE_SIZE
- See Also:
- Constant Field Values
-
KEY_SIZE
private static final int KEY_SIZE
- See Also:
- Constant Field Values
-
INITIAL_LINEAR_PROBE
private static final int INITIAL_LINEAR_PROBE
- See Also:
- Constant Field Values
-
keys
private final double[] keys
-
occupiedWithData
private final int occupiedWithData
-
containsZeroKey
private final boolean containsZeroKey
-
containsOneKey
private final boolean containsOneKey
-
-
Method Detail
-
isEmptyKey
private static boolean isEmptyKey(double key)
-
isRemovedKey
private static boolean isRemovedKey(double key)
-
isNonSentinel
private static boolean isNonSentinel(double key)
-
hashCode
public int hashCode()
Description copied from interface:DoubleSet
Follows the same general contract asSet.hashCode()
.- Specified by:
hashCode
in interfaceDoubleSet
- Specified by:
hashCode
in classAbstractDoubleSet
-
size
public int size()
Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
-
doubleIterator
public DoubleIterator doubleIterator()
Description copied from interface:DoubleIterable
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an imperative style.- Specified by:
doubleIterator
in interfaceDoubleIterable
-
toArray
public double[] toArray()
Description copied from interface:DoubleIterable
Converts the DoubleIterable to a primitive double array.- Specified by:
toArray
in interfaceDoubleIterable
-
toArray
public double[] toArray(double[] array)
Description copied from interface:DoubleIterable
Converts the DoubleIterable to a primitive double array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArray
in interfaceDoubleIterable
-
contains
public boolean contains(double value)
Description copied from interface:DoubleIterable
Returns true if the value is contained in the DoubleIterable, and false if it is not.- Specified by:
contains
in interfaceDoubleIterable
-
forEach
public void forEach(DoubleProcedure procedure)
Description copied from interface:DoubleIterable
Applies the DoubleProcedure to each element in the DoubleIterable.- Specified by:
forEach
in interfaceDoubleIterable
-
each
public void each(DoubleProcedure procedure)
Description copied from interface:DoubleIterable
A synonym for forEach.- Specified by:
each
in interfaceDoubleIterable
- Since:
- 7.0.
-
select
public ImmutableDoubleSet select(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.- Specified by:
select
in interfaceDoubleIterable
- Specified by:
select
in interfaceDoubleSet
- Specified by:
select
in interfaceImmutableDoubleCollection
- Specified by:
select
in interfaceImmutableDoubleSet
-
reject
public ImmutableDoubleSet reject(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.- Specified by:
reject
in interfaceDoubleIterable
- Specified by:
reject
in interfaceDoubleSet
- Specified by:
reject
in interfaceImmutableDoubleCollection
- Specified by:
reject
in interfaceImmutableDoubleSet
-
collect
public <V> ImmutableSet<V> collect(DoubleToObjectFunction<? extends V> function)
Description copied from interface:DoubleIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceDoubleIterable
- Specified by:
collect
in interfaceDoubleSet
- Specified by:
collect
in interfaceImmutableDoubleCollection
- Specified by:
collect
in interfaceImmutableDoubleSet
-
detectIfNone
public double detectIfNone(DoublePredicate predicate, double ifNone)
- Specified by:
detectIfNone
in interfaceDoubleIterable
-
count
public int count(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.- Specified by:
count
in interfaceDoubleIterable
-
anySatisfy
public boolean anySatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceDoubleIterable
-
allSatisfy
public boolean allSatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceDoubleIterable
-
noneSatisfy
public boolean noneSatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterable
Returns true if none of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
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
-
injectInto
public <T> T injectInto(T injectedValue, ObjectDoubleToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceDoubleIterable
-
writeReplace
private java.lang.Object writeReplace()
-
probe
int probe(double element)
-
probeTwo
int probeTwo(double element, int removedIndex)
-
probeThree
int probeThree(double element, int removedIndex)
-
spreadAndMask
int spreadAndMask(double element)
-
spreadTwoAndMask
int spreadTwoAndMask(double element)
-
mask
private int mask(int spread)
-
-