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

Extensions for kotlin.Int

days

val Int.days: Duration

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

exactAdd

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

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

hours

val Int.hours: Duration

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

millis

val Int.millis: Duration

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

minutes

val Int.minutes: Duration

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

seconds

val Int.seconds: Duration

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