core / io.islandtime.ranges / TimeInterval

TimeInterval

(iosArm64, iosX64, jvm, macosX64) interface TimeInterval<T>

A half-open time interval.

Properties

(iosArm64, iosX64, jvm, macosX64)

endExclusive

The end of the interval, exclusive.

abstract val endExclusive: T
(iosArm64, iosX64, jvm, macosX64)

start

The start of the interval, inclusive.

abstract val start: T

Functions

(iosArm64, iosX64, jvm, macosX64)

contains

Check if value is within the interval based on timeline order.

abstract operator fun contains(value: T): Boolean
(iosArm64, iosX64, jvm, macosX64)

hasBoundedEnd

Check if the interval's end is bounded, meaning it has a finite value.

open fun hasBoundedEnd(): Boolean
(iosArm64, iosX64, jvm, macosX64)

hasBoundedStart

Check if the interval's start is bounded, meaning it has a finite value.

open fun hasBoundedStart(): Boolean
(iosArm64, iosX64, jvm, macosX64)

hasUnboundedEnd

Check if the interval's end is unbounded. In ISO-8601 terminology, this is an "open" end.

abstract fun hasUnboundedEnd(): Boolean
(iosArm64, iosX64, jvm, macosX64)

hasUnboundedStart

Check if the interval's start is unbounded. In ISO-8601 terminology, this is an "open" start.

abstract fun hasUnboundedStart(): Boolean
(iosArm64, iosX64, jvm, macosX64)

isBounded

Check if both the start and end of the interval are bounded, meaning it has a finite range.

open fun isBounded(): Boolean
(iosArm64, iosX64, jvm, macosX64)

isEmpty

Check if the interval is empty.

abstract fun isEmpty(): Boolean
(iosArm64, iosX64, jvm, macosX64)

isUnbounded

Check if both the start and end of the interval are unbounded, meaning this is an infinite time period in both directions.

open fun isUnbounded(): Boolean

Inheritors

(iosArm64, iosX64, jvm, macosX64)

DateTimeInterval

An interval between two arbitrary date-times.

class DateTimeInterval : TimeInterval<DateTime>
(iosArm64, iosX64, jvm, macosX64)

TimePointInterval

A half-open interval of time points.

abstract class TimePointInterval<T : TimePoint<T>> : TimeInterval<T>