Class AbstractMutableDoubleValuesMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableDoubleValuesMap
-
- All Implemented Interfaces:
DoubleIterable,DoubleValuesMap,MutableDoubleValuesMap,PrimitiveIterable
- Direct Known Subclasses:
ByteDoubleHashMap,CharDoubleHashMap,DoubleDoubleHashMap,FloatDoubleHashMap,IntDoubleHashMap,LongDoubleHashMap,ShortDoubleHashMap
public abstract class AbstractMutableDoubleValuesMap extends AbstractDoubleIterable implements MutableDoubleValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.- Since:
- 6.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractMutableDoubleValuesMap.AbstractDoubleValuesCollectionprotected static classAbstractMutableDoubleValuesMap.SentinelValues
-
Constructor Summary
Constructors Constructor Description AbstractMutableDoubleValuesMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddEmptyKeyValue(double value)protected voidaddRemovedKeyValue(double value)booleanallSatisfy(DoublePredicate predicate)Returns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(DoublePredicate predicate)Returns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.voidappendString(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.RichIterable<DoubleIterable>chunk(int size)Partitions elements in fixed size chunks.<V> MutableBag<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.booleancontains(double value)Returns true if the value is contained in the DoubleIterable, and false if it is not.booleancontainsAll(DoubleIterable source)Returns true if all of the values specified in the source DoubleIterable are contained in the DoubleIterable, and false if they are not.booleancontainsValue(double value)Returns whether or not this map contains the value.intcount(DoublePredicate predicate)Returns a count of the number of elements in the DoubleIterable that return true for the specified predicate.doubledetectIfNone(DoublePredicate predicate, double value)voideach(DoubleProcedure procedure)A synonym for forEach.voidforEachValue(DoubleProcedure procedure)Iterates through each value in this map.protected abstract doublegetEmptyValue()protected abstract intgetOccupiedWithData()protected abstract AbstractMutableDoubleValuesMap.SentinelValuesgetSentinelValues()protected abstract intgetTableSize()protected abstract doublegetValueAtIndex(int index)booleanisEmpty()Returns true if this iterable has zero items.protected abstract booleanisNonSentinelAtIndex(int index)doublemax()doublemin()booleannotEmpty()The English equivalent of !this.isEmpty()MutableDoubleBagreject(DoublePredicate predicate)Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.protected voidremoveEmptyKey()protected voidremoveRemovedKey()MutableDoubleBagselect(DoublePredicate predicate)Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.protected abstract voidsetSentinelValuesNull()intsize()Returns the number of items in this iterable.doublesum()double[]toArray()Converts the DoubleIterable to a primitive double array.double[]toArray(double[] target)Converts the DoubleIterable to a primitive double array.-
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, equals, finalize, getClass, hashCode, 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, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.DoubleValuesMap
tap, values
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableDoubleValuesMap
clear, doubleIterator
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
-
-
-
Method Detail
-
getOccupiedWithData
protected abstract int getOccupiedWithData()
-
getSentinelValues
protected abstract AbstractMutableDoubleValuesMap.SentinelValues getSentinelValues()
-
setSentinelValuesNull
protected abstract void setSentinelValuesNull()
-
getEmptyValue
protected abstract double getEmptyValue()
-
getValueAtIndex
protected abstract double getValueAtIndex(int index)
-
getTableSize
protected abstract int getTableSize()
-
isNonSentinelAtIndex
protected abstract boolean isNonSentinelAtIndex(int index)
-
addEmptyKeyValue
protected void addEmptyKeyValue(double value)
-
removeEmptyKey
protected void removeEmptyKey()
-
addRemovedKeyValue
protected void addRemovedKeyValue(double value)
-
removeRemovedKey
protected void removeRemovedKey()
-
contains
public boolean contains(double value)
Description copied from interface:DoubleIterableReturns true if the value is contained in the DoubleIterable, and false if it is not.- Specified by:
containsin interfaceDoubleIterable
-
containsAll
public boolean containsAll(DoubleIterable source)
Description copied from interface:DoubleIterableReturns true if all of the values specified in the source DoubleIterable are contained in the DoubleIterable, and false if they are not.- Specified by:
containsAllin interfaceDoubleIterable
-
max
public double max()
- Specified by:
maxin interfaceDoubleIterable
-
min
public double min()
- Specified by:
minin interfaceDoubleIterable
-
size
public int size()
Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
each
public void each(DoubleProcedure procedure)
Description copied from interface:DoubleIterableA synonym for forEach.- Specified by:
eachin interfaceDoubleIterable- Since:
- 7.0.
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
toArray
public double[] toArray()
Description copied from interface:DoubleIterableConverts the DoubleIterable to a primitive double array.- Specified by:
toArrayin interfaceDoubleIterable
-
toArray
public double[] toArray(double[] target)
Description copied from interface:DoubleIterableConverts 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:
toArrayin interfaceDoubleIterable
-
select
public MutableDoubleBag select(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceDoubleValuesMap- Specified by:
selectin interfaceMutableDoubleValuesMap
-
reject
public MutableDoubleBag reject(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceDoubleValuesMap- Specified by:
rejectin interfaceMutableDoubleValuesMap
-
collect
public <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
Description copied from interface:DoubleIterableReturns 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:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceDoubleValuesMap- Specified by:
collectin interfaceMutableDoubleValuesMap
-
detectIfNone
public double detectIfNone(DoublePredicate predicate, double value)
- Specified by:
detectIfNonein interfaceDoubleIterable
-
count
public int count(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns a count of the number of elements in the DoubleIterable that return true for the specified predicate.- Specified by:
countin interfaceDoubleIterable
-
anySatisfy
public boolean anySatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns true if any of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceDoubleIterable
-
allSatisfy
public boolean allSatisfy(DoublePredicate predicate)
Description copied from interface:DoubleIterableReturns true if all of the elements in the DoubleIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceDoubleIterable
-
chunk
public RichIterable<DoubleIterable> chunk(int size)
Description copied from interface:DoubleIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceDoubleIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingDoubleIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
sum
public double sum()
- Specified by:
sumin interfaceDoubleIterable
-
containsValue
public boolean containsValue(double value)
Description copied from interface:DoubleValuesMapReturns whether or not this map contains the value.- Specified by:
containsValuein interfaceDoubleValuesMap- Parameters:
value- the value to test- Returns:
- if this collection contains the value
-
forEachValue
public void forEachValue(DoubleProcedure procedure)
Description copied from interface:DoubleValuesMapIterates through each value in this map.- Specified by:
forEachValuein interfaceDoubleValuesMap- Parameters:
procedure- the procedure to invoke for each value in this map.
-
-