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.
-
Constructor Summary
Constructors Constructor Description AbstractMutableDoubleValuesMap()
-
Method Summary
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(Appendable appendable, String start, String separator, 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.boolean
contains(double value)
Returns true if the value is contained in the DoubleIterable, and false if it is not.boolean
containsAll(DoubleIterable source)
Returns true if the all of the values specified in the source DoubleIterable are contained in the DoubleIterable, and false if they are not.boolean
containsValue(double value)
Returns whether or not this map contains the value.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 value)
void
each(DoubleProcedure procedure)
A synonym for forEach.void
forEach(DoubleProcedure procedure)
Applies the DoubleProcedure to each element in the DoubleIterable.void
forEachValue(DoubleProcedure procedure)
Iterates through each value in this map.boolean
isEmpty()
Returns true if this iterable has zero items.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.boolean
notEmpty()
The English equivalent of !this.isEmpty()MutableDoubleBag
reject(DoublePredicate predicate)
Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.MutableDoubleBag
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.double
sum()
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, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from class java.lang.Object
equals, 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, flatCollect, injectInto, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
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
-
Constructor Details
-
AbstractMutableDoubleValuesMap
public AbstractMutableDoubleValuesMap()
-
-
Method Details
-
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
-
containsAll
Description copied from interface:DoubleIterable
Returns true if the all of the values specified in the source DoubleIterable are contained in the DoubleIterable, and false if they are not.- Specified by:
containsAll
in interfaceDoubleIterable
- Overrides:
containsAll
in classAbstractDoubleIterable
-
max
public double max()- Specified by:
max
in interfaceDoubleIterable
-
min
public double min()- Specified by:
min
in interfaceDoubleIterable
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
forEach
Description copied from interface:DoubleIterable
Applies the DoubleProcedure to each element in the DoubleIterable.- Specified by:
forEach
in interfaceDoubleIterable
-
each
Description copied from interface:DoubleIterable
A synonym for forEach.- Specified by:
each
in interfaceDoubleIterable
- Since:
- 7.0.
-
appendString
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
-
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[] target)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
-
select
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 interfaceDoubleValuesMap
- Specified by:
select
in interfaceMutableDoubleValuesMap
-
reject
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 interfaceDoubleValuesMap
- Specified by:
reject
in interfaceMutableDoubleValuesMap
-
collect
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 interfaceDoubleValuesMap
- Specified by:
collect
in interfaceMutableDoubleValuesMap
-
detectIfNone
- Specified by:
detectIfNone
in interfaceDoubleIterable
-
count
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
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
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
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
-
chunk
Description copied from interface:DoubleIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceDoubleIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingDoubleIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
sum
public double sum()- Specified by:
sum
in interfaceDoubleIterable
-
containsValue
public boolean containsValue(double value)Description copied from interface:DoubleValuesMap
Returns whether or not this map contains the value.- Specified by:
containsValue
in interfaceDoubleValuesMap
- Parameters:
value
- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:DoubleValuesMap
Iterates through each value in this map.- Specified by:
forEachValue
in interfaceDoubleValuesMap
- Parameters:
procedure
- the procedure to invoke for each value in this map.
-