class Temperature : Comparable


Represents a unit of temperature. Supported units:

Summary

Public companion functions

Temperature
celsius(value: Double)

Creates Temperature with the specified value in Celsius degrees.

Temperature

Creates Temperature with the specified value in Fahrenheit degrees.

Public functions

open operator Int
open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Double

Returns the temperature in Celsius degrees.

Double

Returns the temperature in Fahrenheit degrees.

Public companion functions

celsius

Added in 1.1.0-alpha10
fun celsius(value: Double): Temperature

Creates Temperature with the specified value in Celsius degrees.

fahrenheit

Added in 1.1.0-alpha10
fun fahrenheit(value: Double): Temperature

Creates Temperature with the specified value in Fahrenheit degrees.

Public functions

compareTo

Added in 1.1.0-alpha10
open operator fun compareTo(other: Temperature): Int

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

inCelsius

Added in 1.1.0-alpha10
val inCelsiusDouble

Returns the temperature in Celsius degrees.

inFahrenheit

Added in 1.1.0-alpha10
val inFahrenheitDouble

Returns the temperature in Fahrenheit degrees.