Kactoos

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

SumOfFloatScalar

class SumOfFloatScalar : Scalar<Float>

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

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

val sum = SumOfFloatScalar({ 1f }, { 2f }, { 3f }).invoke()

There is no thread-safety guarantee.

Parameters

scalars - Scalars to sum up values from

Since 0.4

Constructors

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

Functions

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