kactoos-jvm / nnl.rocks.kactoos.scalar / SumOfIntScalar
class SumOfIntScalar : Scalar<Int>
Integer 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 = SumOfIntScalar({ 1 }, { 2 }, { 3 }).invoke()
There is no thread-safety guarantee.
scalars - Scalars to sum up values from
Since 0.4
| Name | Summary |
|---|---|
| <init> | SumOfIntScalar(vararg scalars: Scalar<Int>)SumOfIntScalar(vararg scalars: KScalar<Int>)SumOfIntScalar(scalars: Iterable<KScalar<Int>>)Integer Scalar which sums up the values of other Scalars of the same type |
| Name | Summary |
|---|---|
| invoke | fun invoke(): IntGet value of this Scalar |