Kactoos

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

SumOf

class SumOf : NumberEnvelope

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

Constructors

Name Summary
<init> SumOf(vararg src: Int)
SumOf(vararg src: Long)
SumOf(vararg src: Double)
SumOf(vararg src: Float)SumOf(numbers: Iterable<Number>)
Represents total sum of given numbers.

Inherited Functions

Name Summary
invoke open fun invoke(): Double
Get value of this Scalar
toByte fun toByte(): Byte
toChar fun toChar(): Char
toDouble fun toDouble(): Double
toFloat fun toFloat(): Float
toInt fun toInt(): Int
toLong fun toLong(): Long
toShort fun toShort(): Short