java.lang.Object
org.tquadrat.foundation.value.api.ValueBase<Power,PowerValue>
org.tquadrat.foundation.value.PowerValue
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<DimensionedValue<Power>>,Formattable,DimensionedValue<Power>
@ClassVersion(sourceVersion="$Id: PowerValue.java 1073 2023-10-01 11:08:51Z tquadrat $")
@API(status=STABLE,
since="0.3.0")
public final class PowerValue
extends ValueBase<Power,PowerValue>
A value class for Powers.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: PowerValue.java 1073 2023-10-01 11:08:51Z tquadrat $
- Since:
- 0.3.0
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.value.PowerValue"
-
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
ConstructorsConstructorDescriptionPowerValue(Power dimension, String value) Creates a newPowerValueinstance.PowerValue(Power dimension, BigDecimal value) Creates a newPowerValueinstance.PowerValue(Power dimension, N value) Creates a newPowerValueinstance. -
Method Summary
Methods inherited from class org.tquadrat.foundation.value.api.ValueBase
baseValue, copy, copy, equals, getUnit, hashCode, setUnit, toString
-
Constructor Details
-
PowerValue
Creates a newPowerValueinstance.- Parameters:
dimension- The dimension.value- The value.
-
PowerValue
Creates a newPowerValueinstance.- 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.
-
PowerValue
Creates a newPowerValueinstance.- 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<Power>- Overrides:
clonein classValueBase<Power,PowerValue> - Returns:
- The copy.
-
