Class Scalar.Speed

java.lang.Object
java.lang.Number
org.apache.sis.measure.Scalar<javax.measure.quantity.Speed>
org.apache.sis.measure.Scalar.Speed
All Implemented Interfaces:
Serializable, Comparable<javax.measure.quantity.Speed>, javax.measure.Quantity<javax.measure.quantity.Speed>, javax.measure.quantity.Speed
Enclosing class:
Scalar<Q extends javax.measure.Quantity<Q>>

static final class Scalar.Speed extends Scalar<javax.measure.quantity.Speed> implements javax.measure.quantity.Speed
  • Field Details

  • Constructor Details

    • Speed

      Speed(double value, javax.measure.Unit<javax.measure.quantity.Speed> unit)
  • Method Details

    • create

      javax.measure.Quantity<javax.measure.quantity.Speed> create(double value, javax.measure.Unit<javax.measure.quantity.Speed> unit)
      Description copied from class: Scalar
      Creates a new quantity of same type than this quantity but with a different value and/or unit. This method performs the same work than Quantities.create(double, Unit), but without the need to check for the Apache SIS specific SystemUnit implementation.

      This method is invoked (indirectly) in only two situations:

      • Arithmetic operations that do not change the unit of measurement (addition, subtraction), in which case the given newUnit is the same that the unit of this quantity.
      • Conversion to a new compatible unit by Scalar.to(Unit), provided that the conversion is only a scale factor.
      DerivedScalar relies on the fact that there are no other situations where this method is invoked. If this assumption become not true anymore in a future SIS version, then we need to revisit DerivedScalar.
      Overrides:
      create in class Scalar<javax.measure.quantity.Speed>
      See Also: