Interval

interface Interval<T>

A half-open or closed interval.

Functions

contains
Link copied to clipboard
common
abstract operator fun contains(value: T): Boolean
Checks if this interval contains value.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hasBoundedEnd
Link copied to clipboard
common
open fun hasBoundedEnd(): Boolean
Checks if this interval's end is bounded, meaning it has a finite value.
hasBoundedStart
Link copied to clipboard
common
open fun hasBoundedStart(): Boolean
Checks if this interval's start is bounded, meaning it has a finite value.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
hasUnboundedEnd
Link copied to clipboard
common
abstract fun hasUnboundedEnd(): Boolean
Checks if this interval's end is unbounded.
hasUnboundedStart
Link copied to clipboard
common
abstract fun hasUnboundedStart(): Boolean
Checks if this interval's start is unbounded.
isBounded
Link copied to clipboard
common
open fun isBounded(): Boolean
Checks if both the start and end of this interval are bounded, meaning it has a finite range.
isEmpty
Link copied to clipboard
common
abstract fun isEmpty(): Boolean
Checks if this interval is empty.
isUnbounded
Link copied to clipboard
common
open fun isUnbounded(): Boolean
Checks if both the start and end of this interval are unbounded, meaning this is an infinite time period in both directions.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

endExclusive
Link copied to clipboard
common
abstract val endExclusive: T
The end of this interval, exclusive.
endInclusive
Link copied to clipboard
common
abstract val endInclusive: T
The end of this interval, inclusive.
start
Link copied to clipboard
common
abstract val start: T
The start of this interval, inclusive.

Inheritors

DateRange
Link copied to clipboard
DateTimeInterval
Link copied to clipboard
TimePointInterval
Link copied to clipboard

Extensions

contains
Link copied to clipboard
common
fun <T> Interval<T>.contains(value: T?): Boolean
Checks if this interval contains value.