LongDecades

A number of decades.

inline class LongDecades(value: Long) : Comparable<LongDecades>

Constructors

LongDecades
Link copied to clipboard
common
fun LongDecades(value: Long)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: LongDecades): Int
div
Link copied to clipboard
common

Divides this duration by a scalar value.

operator fun div(scalar: Int): LongDecades
operator fun div(scalar: Long): LongDecades
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
isNegative
Link copied to clipboard
common

Checks if this duration is negative.

fun isNegative(): Boolean
isPositive
Link copied to clipboard
common

Checks if this duration is positive.

fun isPositive(): Boolean
isZero
Link copied to clipboard
common

Checks if this duration is zero.

fun isZero(): Boolean
minus
Link copied to clipboard
common
operator fun minus(months: IntMonths): LongMonths
operator fun minus(months: LongMonths): LongMonths
operator fun minus(years: IntYears): LongYears
operator fun minus(years: LongYears): LongYears
operator fun minus(decades: IntDecades): LongDecades
operator fun minus(decades: LongDecades): LongDecades
operator fun minus(centuries: IntCenturies): LongDecades
operator fun minus(centuries: LongCenturies): LongDecades
plus
Link copied to clipboard
common
operator fun plus(months: IntMonths): LongMonths
operator fun plus(months: LongMonths): LongMonths
operator fun plus(years: IntYears): LongYears
operator fun plus(years: LongYears): LongYears
operator fun plus(decades: IntDecades): LongDecades
operator fun plus(decades: LongDecades): LongDecades
operator fun plus(centuries: IntCenturies): LongDecades
operator fun plus(centuries: LongCenturies): LongDecades
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): LongDecades
operator fun rem(scalar: Long): LongDecades
times
Link copied to clipboard
common

Multiplies this duration by a scalar value.

operator fun times(scalar: Int): LongDecades
operator fun times(scalar: Long): LongDecades
toComponents
Link copied to clipboard
common
inline fun <T> toComponents(action: (LongCenturies, IntDecades) -> T): T
toInt
Link copied to clipboard
common

Converts this duration to an Int value.

fun toInt(): Int
toIntDecades
Link copied to clipboard
common

Converts this duration to IntDecades.

fun toIntDecades(): IntDecades
toString
Link copied to clipboard
common

Converts this duration to an ISO-8601 time interval representation.

open override fun toString(): String
unaryMinus
Link copied to clipboard
common

Negates this duration.

operator fun unaryMinus(): LongDecades

Properties

absoluteValue
Link copied to clipboard
common

The absolute value of this duration.

val absoluteValue: LongDecades
inCenturies
Link copied to clipboard
common

Converts this duration to the number of whole centuries.

val inCenturies: LongCenturies
inMonths
Link copied to clipboard
common

Converts this duration to months.

val inMonths: LongMonths
inYears
Link copied to clipboard
common

Converts this duration to years.

val inYears: LongYears
value
Link copied to clipboard
common

The underlying value.

val value: Long

Extensions

toJavaPeriod
Link copied to clipboard

Converts this duration to an equivalent Java Period.

fun LongDecades.toJavaPeriod(): Period