- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<DimensionedValue<Mass>>
,Formattable
,DimensionedValue<Mass>
@ClassVersion(sourceVersion="$Id: MassValue.java 1072 2023-09-30 20:44:38Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
public final class MassValue
extends ValueBase<Mass,MassValue>
A value class for weights and masses.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: MassValue.java 1072 2023-09-30 20:44:38Z tquadrat $
- Since:
- 0.1.0
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.value.MassValue"
-
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
Constructors -
Method Summary
Methods inherited from class org.tquadrat.foundation.value.api.ValueBase
baseValue, copy, copy, equals, getUnit, hashCode, setUnit, toString
-
Constructor Details
-
MassValue
Creates a newMassValue
instance.- Parameters:
dimension
- The dimension.value
- The value.
-
MassValue
Creates a newMassValue
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
.
-
MassValue
Creates a newMassValue
instance.- Type Parameters:
N
- The type ofvalue
.- Parameters:
dimension
- The dimension.value
- The value.
-
-
Method Details