java.lang.Object
org.tquadrat.foundation.value.api.ValueBase<Pressure,PressureValue>
org.tquadrat.foundation.value.PressureValue
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<DimensionedValue<Pressure>>
,Formattable
,DimensionedValue<Pressure>
@ClassVersion(sourceVersion="$Id: PressureValue.java 1072 2023-09-30 20:44:38Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
public final class PressureValue
extends ValueBase<Pressure,PressureValue>
A value class for pressure values.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: PressureValue.java 1072 2023-09-30 20:44:38Z tquadrat $
- Since:
- 0.1.0
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.value.PressureValue"
-
Field Summary
Fields inherited from class org.tquadrat.foundation.value.api.ValueBase
DEFAULT_VALIDATOR
Fields inherited from interface org.tquadrat.foundation.value.api.DimensionedValue
MATH_CONTEXT
-
Constructor Summary
ConstructorsConstructorDescriptionPressureValue
(Pressure dimension, String value) Creates a newPressureValue
instance.PressureValue
(Pressure dimension, BigDecimal value) Creates a newPressureValue
instance.PressureValue
(Pressure dimension, N value) Creates a newPressureValue
instance. -
Method Summary
Methods inherited from class org.tquadrat.foundation.value.api.ValueBase
baseValue, copy, copy, equals, getUnit, hashCode, setUnit, toString
-
Constructor Details
-
PressureValue
Creates a newPressureValue
instance.- Parameters:
dimension
- The dimension.value
- The value.
-
PressureValue
Creates a newPressureValue
instance.- Parameters:
dimension
- The dimension.value
- The value; it must be possible to parse the given String into aBigDecimal
.- Throws:
NumberFormatException
- The provided value cannot be converted into aBigDecimal
.
-
PressureValue
Creates a newPressureValue
instance.- Type Parameters:
N
- The type ofvalue
.- Parameters:
dimension
- The dimension.value
- The value.
-
-
Method Details
-
clone
Creates a new copy of this value.- Specified by:
clone
in interfaceDimensionedValue<Pressure>
- Overrides:
clone
in classValueBase<Pressure,
PressureValue> - Returns:
- The copy.
-