class Volume : Comparable


Represents a unit of volume. Supported units:

Summary

Public companion functions

Volume

Creates Volume with the specified value in US fluid ounces.

Volume
liters(value: Double)

Creates Volume with the specified value in liters.

Volume

Creates Volume with the specified value in milliliters.

Public functions

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

Public properties

Double

Returns the volume in US fluid ounces.

Double

Returns the volume in liters.

Double

Returns the volume in milliliters.

Public companion functions

fluidOuncesUs

Added in 1.1.0-alpha07
fun fluidOuncesUs(value: Double): Volume

Creates Volume with the specified value in US fluid ounces.

liters

Added in 1.1.0-alpha07
fun liters(value: Double): Volume

Creates Volume with the specified value in liters.

milliliters

Added in 1.1.0-alpha07
fun milliliters(value: Double): Volume

Creates Volume with the specified value in milliliters.

Public functions

compareTo

Added in 1.1.0-alpha07
open operator fun compareTo(other: Volume): Int

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

inFluidOuncesUs

Added in 1.1.0-alpha07
val inFluidOuncesUsDouble

Returns the volume in US fluid ounces.

inLiters

Added in 1.1.0-alpha07
val inLitersDouble

Returns the volume in liters.

inMilliliters

Added in 1.1.0-alpha07
val inMillilitersDouble

Returns the volume in milliliters.