ResultContext

@SinceKotoolsTypes(version = "4.1")
interface ResultContext

Context available when calling the resultOf function.

Functions

Link copied to clipboard

Returns this number as a NegativeInt, which may involve rounding or truncation, or throws an IllegalArgumentException if this number is strictly positive.

Link copied to clipboard

Returns this number as a NonZeroInt, which may involve rounding or truncation, or throws an IllegalArgumentException if this number equals zero.

Link copied to clipboard

Returns this string as a NotBlankString, or throws an IllegalArgumentException if this string is blank.

Link copied to clipboard

Returns a NotEmptyList containing all the elements of this collection, or throws an IllegalArgumentException if this collection is empty.

Link copied to clipboard
open fun <K, V> Map<K, V>.toNotEmptyMap(): NotEmptyMap<K, V>

Returns a NotEmptyMap containing all the entries of this map, or throws an IllegalArgumentException if this map is empty.

Link copied to clipboard

Returns a NotEmptySet containing all the elements of this collection, or throws an IllegalArgumentException if this collection is empty.

Link copied to clipboard

Returns this number as a PositiveInt, which may involve rounding or truncation, or throws an IllegalArgumentException if this number is strictly negative.

Link copied to clipboard

Returns this number as a StrictlyNegativeInt, which may involve rounding or truncation, or throws an IllegalArgumentException if this number is positive.

Link copied to clipboard
@ExperimentalSinceKotoolsTypes(version = "4.2")
open fun Number.toStrictlyPositiveDouble(): StrictlyPositiveDouble

Returns this number as a StrictlyPositiveDouble, which may involve rounding or truncation, or throws an IllegalArgumentException if this number is negative.

Link copied to clipboard

Returns this number as a StrictlyPositiveInt, which may involve rounding or truncation, or throws an IllegalArgumentException if this number is negative.