Kactoos

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

<init>

SumOf(vararg src: Int)

Parameters

src - Integers

Since 0.3

SumOf(vararg src: Long)

Parameters

src - Longs

Since 0.3

SumOf(vararg src: Double)

Parameters

src - Doubles

Since 0.3

SumOf(vararg src: Float)

Parameters

src - Floats

Since 0.3

SumOf(numbers: Iterable<Number>)

Represents total sum of given numbers.

Here is how you can use it to summarize numbers:

val sum = SumOf(1, 2, 3, 4).toInt()
val sum = SumOf(1, 2, 3, 4).toLong()

There is no thread-safety guarantee.

Since 0.3