java.lang.Object
org.tquadrat.foundation.value.api.ValueBase<Length,LengthValue>
org.tquadrat.foundation.value.LengthValue
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<DimensionedValue<Length>>,Formattable,DimensionedValue<Length>
@ClassVersion(sourceVersion="$Id: LengthValue.java 1072 2023-09-30 20:44:38Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
public final class LengthValue
extends ValueBase<Length,LengthValue>
A value class for lengths.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: LengthValue.java 1072 2023-09-30 20:44:38Z tquadrat $
- Since:
- 0.1.0
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.value.LengthValue"
-
Field Summary
Fields inherited from class org.tquadrat.foundation.value.api.ValueBase
DEFAULT_VALIDATORFields inherited from interface org.tquadrat.foundation.value.api.DimensionedValue
MATH_CONTEXT -
Constructor Summary
ConstructorsConstructorDescriptionLengthValue(Length dimension, String value) Creates a newLengthValueinstance.LengthValue(Length dimension, BigDecimal value) Creates a newLengthValueinstance.LengthValue(Length dimension, N value) Creates a newLengthValueinstance. -
Method Summary
Methods inherited from class org.tquadrat.foundation.value.api.ValueBase
baseValue, copy, copy, equals, getUnit, hashCode, setUnit, toString
-
Constructor Details
-
LengthValue
Creates a newLengthValueinstance.- Parameters:
dimension- The dimension.value- The value.
-
LengthValue
Creates a newLengthValueinstance.- 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.
-
LengthValue
Creates a newLengthValueinstance.- 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:
clonein interfaceDimensionedValue<Length>- Overrides:
clonein classValueBase<Length,LengthValue> - Returns:
- The copy.
-
