isWithinRange

fun isWithinRange(value: Int, validRange: IntRange): PropertyState<Int>(source)

Check if the Int value is within a range (inclusive).

Return

property state Correct containing value if value is within validRange (inclusive). Otherwise Incorrect.

Parameters

value

the value that must be within validRange (inclusive).

validRange

the range (inclusive) where value must be in.


fun isWithinRange(value: Long, validRange: LongRange): PropertyState<Long>(source)

Check if the Long value is within a range (inclusive).

Return

property state Correct containing value if value is within validRange (inclusive). Otherwise Incorrect.

Parameters

value

the value that must be within validRange (inclusive).

validRange

the range (inclusive) where value must be in.