Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / SumOfDoubleScalar

SumOfDoubleScalar

class SumOfDoubleScalar : Scalar<Double>

Double Scalar which sums up the values of other Scalars of the same type.

Here is how you can use it to summarize double numbers:

val sum = SumOfDoubleScalar({ 1.0 }, { 2.1 }, { 3.1 }).invoke()

There is no thread-safety guarantee.

Parameters

scalars - Scalars to sum up values from

Since 0.4

Constructors

Name Summary
<init> SumOfDoubleScalar(vararg scalars: Scalar<Double>)
SumOfDoubleScalar(vararg scalars: KScalar<Double>)SumOfDoubleScalar(scalars: Iterable<KScalar<Double>>)
Double Scalar which sums up the values of other Scalars of the same type.

Functions

Name Summary
invoke fun invoke(): Double
Get value of this Scalar