corda / net.corda.core.utilities / kotlin.Int

Extensions for kotlin.Int

days

Extension method for easier construction of Durations in terms of integer days: val twoDays = 2.days.

val Int.days: Duration

exactAdd

Like the + operator but throws ArithmeticException in case of integer overflow.

infix fun Int.exactAdd(b: Int): Int

hours

Extension method for easier construction of Durations in terms of integer hours: val twoHours = 2.hours.

val Int.hours: Duration

millis

Extension method for easier construction of Durations in terms of integer milliseconds: val twoMillis = 2.millis.

val Int.millis: Duration

minutes

Extension method for easier construction of Durations in terms of integer minutes: val twoMinutes = 2.minutes.

val Int.minutes: Duration

seconds

Extension method for easier construction of Durations in terms of integer seconds: val twoSeconds = 2.seconds.

val Int.seconds: Duration