Packages

final class OffsetQuantity[N, U] extends AnyVal with Serializable

A quantity with a unit associated with an additional offset

N

The value type (Double, Int, etc)

U

The unit type (Celsius, Second, etc)

Linear Supertypes
Serializable, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OffsetQuantity
  2. Serializable
  3. AnyVal
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. def +[N2, U2](rhs: Quantity[N2, U2])(implicit ua: UnitAdd[N, U, N2, U2]): OffsetQuantity[N, U]

    Add a quantity to this offset-quantity

    Add a quantity to this offset-quantity

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the sum.

    returns

    this+rhs, expressed in units (N,U).

  4. def -[N2, U2](rhs: Quantity[N2, U2])(implicit us: UnitSub[N, U, N2, U2]): OffsetQuantity[N, U]

    Subtract a quantity from this offset-quantity

    Subtract a quantity from this offset-quantity

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the difference.

    returns

    this-rhs, expressed in units (N,U).

  5. def -[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit sub: OffsetUnitSub[N, U, N2, U2]): Quantity[N, U]

    Compute the difference of two offset-units

    Compute the difference of two offset-units

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand operand in the difference.

    returns

    result of this-rhs, expressed in units (N,U).

  6. def <[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if this quantity is less than another

    Test if this quantity is less than another

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if this is less than the rhs (after conversion to types N,U), false otherwise

  7. def <=[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if this quantity is less than or equal to another

    Test if this quantity is less than or equal to another

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if this is less than or equal to the rhs (after conversion to types N,U), false otherwise

  8. def =!=[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if two quantities are not equal

    Test if two quantities are not equal

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if rhs is not equal to this (after conversion to types N,U), false otherwise

  9. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  10. def ===[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if two offset-quantities are equal

    Test if two offset-quantities are equal

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if rhs is equal to this (after conversion to types N,U), false otherwise

  11. def >[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if this quantity is greater than another

    Test if this quantity is greater than another

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if this is greater than the rhs (after conversion to types N,U), false otherwise

  12. def >=[N2, U2](rhs: OffsetQuantity[N2, U2])(implicit uc: OffsetUnitOrd[N, U, N2, U2]): Boolean

    Test if this quantity is greater than or equal to another

    Test if this quantity is greater than or equal to another

    N2

    the value type of the rhs

    U2

    the unit type of the rhs. Must be convertable to U, or a compile-time type error will result.

    rhs

    the right hand of the comparison.

    returns

    true if this is greater than or equal to the rhs (after conversion to types N,U), false otherwise

  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def show(implicit ustr: UnitString[U]): String

    A string representation of this offset-quantity, using unit abbreviations

  17. def showFull(implicit ustr: UnitString[U]): String

    A string representation of this offset-quantity, using full unit names

  18. def showUnit(implicit ustr: UnitString[U]): String

    A string representation of this offset-quantity's associated unit, using abbreviations

  19. def showUnitFull(implicit ustr: UnitString[U]): String

    A String representation of this offset-quantity's associated unit, using full names

  20. def to[N2, U2](implicit uc: OffsetUnitConverter[N, U, N2, U2]): OffsetQuantity[N2, U2]

    Equivalent to this.toUnit[U2].toValue[N2]

    Equivalent to this.toUnit[U2].toValue[N2]

    N2

    the value type to convert to.

    U2

    the new units to convert to. Must be convertable to U, or a compile-time type error will result.

    returns

    an offset-quantity equivalent to this but with value type N2 and units U2

  21. def toString(): String
    Definition Classes
    OffsetQuantity → Any
  22. def toUnit[U2](implicit uc: OffsetUnitConverter[N, U, N, U2]): OffsetQuantity[N, U2]

    Obtain an offset-quantity that is equivalent to this but with different compatible units

    Obtain an offset-quantity that is equivalent to this but with different compatible units

    U2

    the new units to convert to. Must be convertable to U, or a compile-time type error will result.

    returns

    the offset quantity equivalent to this, but with units U2

  23. def toValue[N2](implicit uc: OffsetUnitConverter[N, U, N2, U]): OffsetQuantity[N2, U]

    Obtain an offset-quantity equivalent to this but with a different value type

    Obtain an offset-quantity equivalent to this but with a different value type

    N2

    the value type to convert to.

    returns

    an offset-quantity equivalent to this but with value type N2 and units U

  24. val value: N

Inherited from Serializable

Inherited from AnyVal

Inherited from Any

Ungrouped