Package org.djunits.quantity
Class Temperature.Reference
java.lang.Object
org.djunits.quantity.def.AbstractReference<Temperature.Reference,TemperatureDifference>
org.djunits.quantity.Temperature.Reference
- All Implemented Interfaces:
org.djutils.base.Identifiable
- Enclosing class:
- Temperature
public static final class Temperature.Reference
extends AbstractReference<Temperature.Reference,TemperatureDifference>
The reference class to define a reference point for the absolute temperature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Temperature.ReferenceCelsius.static final Temperature.ReferenceFahrenheit.static final Temperature.ReferenceKelvin.Fields inherited from class org.djunits.quantity.def.AbstractReference
REFERENCES -
Constructor Summary
ConstructorsConstructorDescriptionReference(String id, String name, TemperatureDifference offset) Define a new reference point for the absolute temperature, with an offset to 0 kelvin.Reference(String id, String name, TemperatureDifference offset, Temperature.Reference offsetReference) Define a new reference point for an absolute temperature. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(String id, String name, TemperatureDifference offset) Define a new reference point for the absolute temperature, with an offset to 0 kelvin.static Temperature.ReferenceGet a reference point for the absolute temperature, based on its id.Methods inherited from class org.djunits.quantity.def.AbstractReference
containsId, equals, get, getId, getName, getOffset, getOffsetReference, getReferenceMap, hashCode, mapFor, snapshotMap, toString, unregister
-
Field Details
-
KELVIN
Kelvin. -
CELSIUS
Celsius. -
FAHRENHEIT
Fahrenheit.
-
-
Constructor Details
-
Reference
public Reference(String id, String name, TemperatureDifference offset, Temperature.Reference offsetReference) Define a new reference point for an absolute temperature.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. offsetReferenceoffsetReference- the reference to which the offset is relative
-
Reference
Define a new reference point for the absolute temperature, with an offset to 0 kelvin.- Parameters:
id- the idname- the name or explanationoffset- the offset w.r.t. offsetReference
-
-
Method Details
-
add
Define a new reference point for the absolute temperature, with an offset to 0 kelvin.- Parameters:
id- the idname- the name or explanationoffset- the offset of this scale relative to 0 kelvin
-
get
Get a reference point for the absolute temperature, based on its id. Return null when the id could not be found.- Parameters:
id- the id- Returns:
- the Temperature.Reference object
-