Kactoos

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

MaxOf

class MaxOf : NumberEnvelope

Find the greatest value among numbers.

Here is how you can use it to find maximum among numbers:

val max = MaxOf(1, 2, 3, 4).toInt()
val max = MaxOf(1L, 2L, 3L).toLong()
val max = MaxOf(listOf(1, 2, 3)).toInt()

There is no thread-safety guarantee.

Since 0.4

Constructors

Name Summary
<init> MaxOf(vararg src: Int)
MaxOf(vararg src: Long)
MaxOf(vararg src: Double)
MaxOf(vararg src: Float)
MaxOf(src: Iterable<Number>)

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