Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / SumOfLongScalar / <init>

<init>

SumOfLongScalar(vararg scalars: Scalar<Long>) SumOfLongScalar(vararg scalars: KScalar<Long>)SumOfLongScalar(scalars: Iterable<KScalar<Long>>)

Long Scalar which sums up the values of other Scalars of the same type

Here is how you can use it to summarize numbers:

val sum = SumOfLongScalar({ 1L }, { 2L }, { 3L }).invoke()

There is no thread-safety guarantee.

Parameters

scalars - Scalars to sum up values from

Since 0.4