Package javax.measure.test.quantity
Class TemperatureQuantity
- All Implemented Interfaces:
Comparable<Quantity<Temperature>>
,Quantity<Temperature>
,Temperature
- Version:
- 1.3, $Date: 2018-12-17 $
- Author:
- Werner Keil
-
Nested Class Summary
Nested classes/interfaces inherited from interface Quantity
Quantity.Scale
-
Field Summary
Fields inherited from class TestQuantity
ONE, scalar, unit, value
-
Constructor Summary
ConstructorDescriptionTemperatureQuantity
(double val, TemperatureUnit un) TemperatureQuantity
(Number val, Unit u) -
Method Summary
Modifier and TypeMethodDescriptionadd
(Quantity<Temperature> that) int
Compares this quantity to the specified Measurement quantity.protected TemperatureQuantity
convert
(TemperatureUnit newUnit) divide
(double v) Quantity<?>
protected double
doubleValue
(Unit<Temperature> unit) protected boolean
boolean
eq
(TestQuantity<Temperature> dq) getUnit()
getValue()
inverse()
boolean
isZero()
Quantity<?>
negate()
subtract
(Quantity<Temperature> that) to
(Unit<Temperature> unit) toString
(boolean withUnit, boolean withSpace, int precision) Methods inherited from class TestQuantity
add, ge, getScale, getType, gt, isEquivalentTo, le, lt, ne, showInUnits, subtract, toString
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Quantity
getScale, isEquivalentTo, toSystemUnit
-
Constructor Details
-
TemperatureQuantity
-
TemperatureQuantity
-
TemperatureQuantity
-
-
Method Details
-
isZero
-
add
-
subtract
-
eq
-
divide
-
convert
-
getScalar
-
toString
-
getValue
- Specified by:
getValue
in interfaceQuantity<Temperature>
- Overrides:
getValue
in classTestQuantity<Temperature>
-
getUnit
- Specified by:
getUnit
in interfaceQuantity<Temperature>
- Overrides:
getUnit
in classTestQuantity<Temperature>
-
multiply
- Specified by:
multiply
in interfaceQuantity<Temperature>
-
multiply
- Specified by:
multiply
in interfaceQuantity<Temperature>
-
inverse
- Specified by:
inverse
in interfaceQuantity<Temperature>
-
doubleValue
-
to
- Specified by:
to
in interfaceQuantity<Temperature>
-
eq
- Overrides:
eq
in classTestQuantity<Temperature>
-
divide
- Specified by:
divide
in interfaceQuantity<Temperature>
-
subtract
- Specified by:
subtract
in interfaceQuantity<Temperature>
-
add
- Specified by:
add
in interfaceQuantity<Temperature>
-
divide
- Specified by:
divide
in interfaceQuantity<Temperature>
-
compareTo
Description copied from class:TestQuantity
Compares this quantity to the specified Measurement quantity. The default implementation compares theQuantity.getValue()
of both this quantity and the specified Quantity stated in the same unit (this quantity'sunit
).- Specified by:
compareTo
in interfaceComparable<Quantity<Temperature>>
- Overrides:
compareTo
in classTestQuantity<Temperature>
- Returns:
- a negative integer, zero, or a positive integer as this quantity is less than, equal to, or greater than the specified Quantity quantity.
-
negate
- Specified by:
negate
in interfaceQuantity<Temperature>
-
asType
- Specified by:
asType
in interfaceQuantity<Temperature>
- Throws:
ClassCastException
-