Length

trait Length extends Ordered[Length]

A quantity or measurement of length. The final classes include Metres, KMetres. The purpose of the separate classes is for displaying values. 100M and 0.1KMetres have the same value but will be displayed differently.

Companion
object
trait Ordered[Length]
trait Comparable[Length]
class Object
trait Matchable
class Any
class MMiles
class Miles
class Yards
class GMetres
class KMetres
class MMetres
class Metres

Value members

Abstract methods

def *(operand: Double): Length

Multiplies this length by the operand scalar Double. The return type will be narrowed to the final class's class in the implementing class.

Multiplies this length by the operand scalar Double. The return type will be narrowed to the final class's class in the implementing class.

def +(operand: Length): Length

Adds the operand length to this length. The return type will be narrowed to the dispatching object's type in the final implementing class.

Adds the operand length to this length. The return type will be narrowed to the dispatching object's type in the final implementing class.

def -(operand: Length): Length

Subtracts the operand length from this length. The return type will be narrowed to the dispatching object's type in the final implementing class.

Subtracts the operand length from this length. The return type will be narrowed to the dispatching object's type in the final implementing class.

def /(operand: Double): Length

Divides this length by the operand scalar Double. The return type will be narrowed to the final class's class in the implementing class.

Divides this length by the operand scalar Double. The return type will be narrowed to the final class's class in the implementing class.

def gMetresNum: Double

The scalar Double value of this length expressed in gigametres or millions of kilometres.

The scalar Double value of this length expressed in gigametres or millions of kilometres.

def kMetresNum: Double

The scalar Double value of this length expressed in kilometres.

The scalar Double value of this length expressed in kilometres.

def mMetresNum: Double

The scalar Double value of this length expressed in megametres.

The scalar Double value of this length expressed in megametres.

def mMilesNum: Double

The scalar Double value of this length expressed in millions of miles.

The scalar Double value of this length expressed in millions of miles.

def max(operand: Length): Length

Returns the max Length of this and the operand value. The return type will be narrowed to the final class's class in the implementing class.

Returns the max Length of this and the operand value. The return type will be narrowed to the final class's class in the implementing class.

def metresNum: Double

The scalar Double value of this length expressed in metres.

The scalar Double value of this length expressed in metres.

def milesNum: Double

The scalar Double value of this length expressed in miles.

The scalar Double value of this length expressed in miles.

Negates this length. The return type will be narrowed to the final class's class in the implementing class.

Negates this length. The return type will be narrowed to the final class's class in the implementing class.

def yardsNum: Double

The scalar Double value of this length expressed in miles.

The scalar Double value of this length expressed in miles.

Concrete methods

def /(operand: Length): Double
Implicitly added by LengthExtensions
@inline
final

The value of this length expressed as GMetres gigametres or millions of kilometres.

The value of this length expressed as GMetres gigametres or millions of kilometres.

@inline
final

The value of this length expressed as KMetres.

The value of this length expressed as KMetres.

@inline
final

The value of this length expressed as MMetres megametres or thousands of kilometres.

The value of this length expressed as MMetres megametres or thousands of kilometres.

@inline
final

The value of this length expressed as Miles.

The value of this length expressed as Miles.

@inline
final

The value of this length expressed as Metres.

The value of this length expressed as Metres.

@inline
final

The value of this length expressed as Miles.

The value of this length expressed as Miles.

@inline
final

The value of this length expressed as Miles.

The value of this length expressed as Miles.

Inherited methods

def <(that: Length): Boolean
Inherited from
Ordered
def <=(that: Length): Boolean
Inherited from
Ordered
def >(that: Length): Boolean
Inherited from
Ordered
def >=(that: Length): Boolean
Inherited from
Ordered
def compare(that: Length): Int
Inherited from
Ordered
def compareTo(that: Length): Int
Inherited from
Ordered

Concrete fields

Implicitly added by LengthExtensions