Priority

value class Priority(rawValue: Double) : Comparable<Priority> (source)

Represents the priority of a value/task.

Negative and positive priorities are possible as they are all converted to Double for comparisons. You are also able to convert Longs to priority but note that they will also be converted to Double.

Constructors

Link copied to clipboard
constructor(rawValue: Double)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator override fun compareTo(other: Priority): Int
Link copied to clipboard
operator fun div(scale: Double): Priority
operator fun div(scale: Int): Priority

Returns a priority whose value is this priority value divided by the given scale number.

Link copied to clipboard

Returns true if the priority value is less than zero.

Link copied to clipboard

Returns true if the priority value is greater than zero.

Link copied to clipboard
operator fun minus(other: Priority): Priority

Returns priority whose value is the difference between this ann other priority values.

Link copied to clipboard
operator fun plus(other: Priority): Priority

Returns priority whose value is the sum of this ann other priority values.

Link copied to clipboard
operator fun times(scale: Double): Priority

Returns priority whose value is the priority value, multiplied by the given scale number

operator fun times(scale: Int): Priority

Returns priority whose value is the priority value, multiplied by the given scale number.

Link copied to clipboard

Converts the priority into a double

Link copied to clipboard
fun toInt(): Int

Converts the priority into an integer

Link copied to clipboard
fun toLong(): Long

Converts the priority into a long