Class Scalar.Energy

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

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

  • Constructor Details

    • Energy

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

    • create

      javax.measure.Quantity<javax.measure.quantity.Energy> create(double value, javax.measure.Unit<javax.measure.quantity.Energy> 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.Energy>
      See Also: