RangedAttributeType

A type of attribute that only accepts values between a minimum and maximum value.

Functions

Link copied to clipboard
@NotNull
abstract fun key(): @NotNull Key
Link copied to clipboard
abstract fun sanitizeValue(value: Double): Double

Ensures that the given value satisfies the constraints of this attribute type.

Link copied to clipboard
@NotNull
abstract fun translationKey(): @NotNull String

Properties

Link copied to clipboard
@get:JvmName(name = "defaultValue")
abstract val defaultValue: Double

The default value for attributes of this type.

Link copied to clipboard
@get:JvmName(name = "maximum")
abstract val maximum: Double

The maximum value for attributes of this type.

Link copied to clipboard
@get:JvmName(name = "minimum")
abstract val minimum: Double

The minimum value for attributes of this type.