Unit

enum Unit

Enum describing different units and thier conversions to each other

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String

Functions

Link copied to clipboard
open fun convert(@NonNull value: BigDecimal, @NonNull from: Unit, @NonNull to: Unit): BigDecimal
Converts a given value from one unit to another.
Link copied to clipboard
open fun fromString(value: String): Unit
Returns a unit from it's string representation.
Link copied to clipboard
open fun getFractionalUnit(decimal: Int): Unit
Gets the fractional unit of a given decimal place.
Link copied to clipboard
open fun getSmallestUnit(): Unit
Gets the smallest possible unit of a dimension group
Link copied to clipboard
open fun valueOf(name: String): Unit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
open fun values(): Array<Unit>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.