Adds the values as selected.
Summation class:
with its static methods, the Number class can calculate inheritance classes, return the sum of its values, transform.
can handle:
Array
Collection
Map
It can decompose these types and also calculate the internal values.
Class cannot be inherited or instantiated, its methods cannot be overridden.
summation(x)
Calculates the sum of the values of the corresponding variable specified. It can handle classes inherited from theNumber
class. PreferredNumber, Collection, Map
. Can accept classes and interfaces derived fromNumber[]
,Collection
, or classes and interfaces derived fromMap
.
xNumber, Collection, Map
type variable that calculates the sum of its internal values, internal values must be of type Number!
return After deciding on the type, it gives the sum of the values in it.
summationArray(x)
It calculates the sum of the values of the given corresponding variable, and returns it stored in anarray
. It can handle classes inherited from theNumber
class. PreferredNumber, Collection, Map
. Can accept classes and interfaces derived fromNumber[]
,Collection
, or classes and interfaces derived fromMap
.
xNumber, Collection, Map
type variable that calculates the sum of its internal values.
return Anarray
containing the internal values of the expanded selected variable. Its type will be the type of the variable's internal values.
summationCollection(x, classCollectionNameDotClass)
Calculates the sum of the values of the given variable, thenCollection
returns it as a specified derived class. It can handle classes inherited from the Number class. Collection Specified Collection type PreferredNumber, Collection, Map
. Can accept classes and interfaces derived fromNumber[]
,Collection
, or classes and interfaces derived fromMap
.
xNumber, Collection, Map
type variable that calculates the sum of its internal values.
classCollectionNameDotClass Must be specified to define the derived type of Collection.
return Returns values as specifiedCollection
type.
summationMap(x, classMapNameDotClass)
Calculates the sum of the values of the given variable and returns it stored as the specifiedMap
class. preferredNumber, Collection, Map
. Given key can be ofNumber, Collection, Map
type. It can handle classes inherited from theNumber
class. SpecificMap
type. preferredNumber, Collection, Map
. Can accept classes and interfaces derived fromNumber[]
,Collection
, or classes and interfaces derived fromMap
.
xNumber, Collection or Map
type variable that calculates the sum of its internal values. classMapNameDotClass Required to specify theMap
derived type. returnMap
is one of the specified derived classes and returns two values, the key ofMap
is filled in the specified way. If there is no or the key type or size is not suitable, then the default is to upload.
Magyar Zoltán