Package org.apache.sis.measure
Class Scalar.Time
java.lang.Object
java.lang.Number
org.apache.sis.measure.Scalar<javax.measure.quantity.Time>
org.apache.sis.measure.Scalar.Time
- All Implemented Interfaces:
Serializable
,Comparable<javax.measure.quantity.Time>
,javax.measure.Quantity<javax.measure.quantity.Time>
,javax.measure.quantity.Time
static final class Scalar.Time
extends Scalar<javax.measure.quantity.Time>
implements javax.measure.quantity.Time
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.measure.Scalar
Scalar.Acceleration, Scalar.Angle, Scalar.Area, Scalar.Dimensionless, Scalar.Energy, Scalar.Force, Scalar.Frequency, Scalar.Length, Scalar.Mass, Scalar.Power, Scalar.Pressure, Scalar.Speed, Scalar.Temperature, Scalar.Time, Scalar.Volume
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) javax.measure.Quantity
<javax.measure.quantity.Time> create
(double value, javax.measure.Unit<javax.measure.quantity.Time> unit) Creates a new quantity of same type than this quantity but with a different value and/or unit.Methods inherited from class org.apache.sis.measure.Scalar
add, asType, byteValue, compareTo, divide, divide, doubleValue, equals, floatValue, getUnit, getValue, hashCode, intValue, inverse, longValue, multiply, multiply, shortValue, subtract, to, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.measure.Quantity
add, asType, divide, divide, getUnit, getValue, inverse, multiply, multiply, subtract, to
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Time
Time(double value, javax.measure.Unit<javax.measure.quantity.Time> unit)
-
-
Method Details
-
create
javax.measure.Quantity<javax.measure.quantity.Time> create(double value, javax.measure.Unit<javax.measure.quantity.Time> 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 thanQuantities.create(double, Unit)
, but without the need to check for the Apache SIS specificSystemUnit
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 revisitDerivedScalar
. - Arithmetic operations that do not change the unit of measurement (addition, subtraction),
in which case the given
-