org.nield.kotlinstatistics.range.Range.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-statistics Show documentation
Show all versions of kotlin-statistics Show documentation
Statistical and analytical extensions for Kotlin
The newest version!
package org.nield.kotlinstatistics.range
/**
* A `Range` is an abstract interface common to all ranges, regardless of their inclusive or exclusive nature
*/
interface Range> {
/**
* The minimum value in the range, regardless if it is inclusive or exclusive
*/
val lowerBound: T
/**
* The maximum value in the range, regardless if it is inclusive or exclusive
*/
val upperBound: T
/**
* Checks whether the specified [value] belongs to the range.
*/
operator fun contains(value: T): Boolean
/**
* Checks whether the range is empty.
*/
fun isEmpty(): Boolean
}