Package ome.units.quantity
Class Temperature
java.lang.Object
ome.units.quantity.Quantity
ome.units.quantity.Temperature
- All Implemented Interfaces:
Comparable<Temperature>
Temperature quantity.
- Since:
- 5.1
-
Constructor Summary
ConstructorsConstructorDescriptionTemperature(Number inValue, Unit<Temperature> inUnit) Create an Temperature. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Temperature other) Check quantities for equality.booleanCheck quantities for equality.inthashCode()toString()unit()Get the unit for this quantity.value()Get the numerical value of this quantity.value(Unit<Temperature> inUnit) Perform a unit conversion.
-
Constructor Details
-
Temperature
Create an Temperature.- Parameters:
inValue- the value.inUnit- the unit type.
-
-
Method Details
-
value
Description copied from class:QuantityGet the numerical value of this quantity. -
value
Perform a unit conversion.- Parameters:
inUnit- the unit to convert to.- Returns:
- the current quantity value converted to the specified unit, or null if the conversion is not possible.
-
equals
Check quantities for equality. Unit conversion will be performed when required to convert into the unit system of this quantity in order to perform the comparison. Note that floating point comparison is dangerous. Do not use this method. -
compareTo
Check quantities for equality. Unit conversion will be performed when required to convert into the unit system of this quantity in order to perform the comparison. Note that floating point comparison is dangerous. Do not use this method.- Specified by:
compareToin interfaceComparable<Temperature>- Returns:
- true if equal, false if not equal.
-
hashCode
public int hashCode() -
toString
-
unit
Description copied from class:QuantityGet the unit for this quantity.
-