kactoos-jvm / nnl.rocks.kactoos.scalar / Ternary
class Ternary<T : Any> : Scalar<T>
Ternary operation.
There is no thread-safety guarantee.
T - Type of item.
condition - The condition
consequent - The consequent
alternative - The alternative
Since 0.4
| Name | Summary |
|---|---|
| <init> | Ternary(cnd: Boolean, cons: T, alter: T)Ternary(cnd: KScalar<Boolean>, cons: T, alter: T)Ternary(condition: KScalar<Boolean>, consequent: KScalar<T>, alternative: KScalar<T>)Ternary operation. |
| Name | Summary |
|---|---|
| invoke | fun invoke(): TGet value of this Scalar |
| Name | Summary |
|---|---|
| invoke | operator fun <T : Any, X : Any> invoke(input: X, cnd: Func<X, Boolean>, cons: Func<X, T>, alter: Func<X, T>): Ternary<T> |