//core/io.islandtime.measures/Decades
Decades¶
common
value class Decades(value: Long) : Comparable<Decades>
Constructors¶
Decades | common fun Decades(value: Int) |
Types¶
Name | Summary |
---|---|
Companion | common object Companion |
Functions¶
Name | Summary |
---|---|
compareTo | common open operator override fun compareTo(other: Decades): Int |
div | common operator fun div(scalar: Int): Decades operator fun div(scalar: Long): Decades Returns this duration divided by a scalar value. @throws ArithmeticException if overflow occurs or the scalar is zero |
minus | common operator fun minus(centuries: Centuries): Decades operator fun minus(decades: Decades): Decades operator fun minus(months: Months): Months operator fun minus(years: Years): Years |
plus | common operator fun plus(centuries: Centuries): Decades operator fun plus(decades: Decades): Decades operator fun plus(months: Months): Months operator fun plus(years: Years): Years |
rem | common operator fun rem(scalar: Int): Decades operator fun rem(scalar: Long): Decades Returns the remainder of this duration divided by a scalar value. |
times | common operator fun times(scalar: Int): Decades operator fun times(scalar: Long): Decades Multiplies this duration by a scalar value. @throws ArithmeticException if overflow occurs |
toComponents | common inline fun <T> toComponents(action: (centuries: Centuries, decades: Decades) -> T): T |
toComponentValues | common inline fun <T> toComponentValues(action: (centuries: Long, decades: Int) -> T): T |
toDouble | common fun toDouble(): Double Converts this duration to a Double value. |
toInt | common fun toInt(): Int Converts this duration to an Int value. @throws ArithmeticException if overflow occurs |
toLong | common fun toLong(): Long Converts this duration to a Long value. |
toString | common open override fun toString(): String Converts this duration to an ISO-8601 time interval representation. |
unaryMinus | common operator fun unaryMinus(): Decades Negates this duration. @throws ArithmeticException if overflow occurs |
Properties¶
Name | Summary |
---|---|
absoluteValue | common val absoluteValue: Decades The absolute value of this duration. @throws ArithmeticException if overflow occurs |
inMonths | common val inMonths: Months Converts this duration to months. @throws ArithmeticException if overflow occurs |
inWholeCenturies | common val inWholeCenturies: Centuries Converts this duration to the number of whole centuries. |
inYears | common val inYears: Years Converts this duration to years. @throws ArithmeticException if overflow occurs |
value | common val value: Long The underlying value. |
Extensions¶
Name | Summary |
---|---|
toJavaPeriod | jvm fun Decades.toJavaPeriod(): Period Converts this duration to an equivalent Java Period . |