Skip to content

//core/io.islandtime.measures/Centuries

Centuries

common

@JvmInline

value class Centuries(val value: Long) : Comparable<Centuries>

Constructors

Centuries

common

constructor(value: Int)

constructor(value: Long)

Types

Name Summary
Companion

common


object Companion

Properties

Name Summary
absoluteValue

common


val absoluteValue: Centuries

The absolute value of this duration.
inDecades

common


val inDecades: Decades

Converts this duration to decades.
inMonths

common


val inMonths: Months

Converts this duration to months.
inYears

common


val inYears: Years

Converts this duration to years.
value

common


val value: Long

The underlying value.

Functions

Name Summary
compareTo

common


open operator override fun compareTo(other: Centuries): Int
div

common


operator fun div(scalar: Int): Centuries

operator fun div(scalar: Long): Centuries

Returns this duration divided by a scalar value.
minus

common


operator fun minus(centuries: Centuries): Centuries

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): Centuries

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): Centuries

operator fun rem(scalar: Long): Centuries

Returns the remainder of this duration divided by a scalar value.
times

common


operator fun times(scalar: Int): Centuries

operator fun times(scalar: Long): Centuries

Multiplies this duration by a scalar value.
toDouble

common


fun toDouble(): Double

Converts this duration to a Double value.
toInt

common


fun toInt(): Int

Converts this duration to an Int value.
toJavaPeriod

jvm


fun Centuries.toJavaPeriod(): Period

Converts this duration to an equivalent Java Period.
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(): Centuries

Negates this duration.