Package org.djunits.value
Interface Absolute<AU extends AbsoluteLinearUnit<AU,RU>,A extends Absolute<AU,A,RU,R>,RU extends Unit<RU>,R extends RelWithAbs<AU,A,RU,R>>
- Type Parameters:
AU
- the absolute unit typeA
- the absolute value typeRU
- the relative unit typeR
- the relative value type
- All Known Implementing Classes:
AbsoluteTemperature
,AbsoluteTemperatureMatrix
,AbsoluteTemperatureVector
,Direction
,DirectionMatrix
,DirectionVector
,DoubleMatrixAbs
,DoubleScalarAbs
,DoubleVectorAbs
,FloatAbsoluteTemperature
,FloatAbsoluteTemperatureMatrix
,FloatAbsoluteTemperatureVector
,FloatDirection
,FloatDirectionMatrix
,FloatDirectionVector
,FloatMatrixAbs
,FloatPosition
,FloatPositionMatrix
,FloatPositionVector
,FloatScalarAbs
,FloatTime
,FloatTimeMatrix
,FloatTimeVector
,FloatVectorAbs
,Position
,PositionMatrix
,PositionVector
,Time
,TimeMatrix
,TimeVector
public interface Absolute<AU extends AbsoluteLinearUnit<AU,RU>,A extends Absolute<AU,A,RU,R>,RU extends Unit<RU>,R extends RelWithAbs<AU,A,RU,R>>
Absolute values are quantities that are measured from some agreed upon reference point. Absolute types always have an
associated Relative type, indicated by the interface AbsWithRel. Values are Absolute when the sum of two values makes no
sense, but the difference does (but results in a Relative).
Copyright (c) 2015-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Method Summary
-
Method Details
-
plus
Add a Relative value to this Absolute value. A new value is returned due to immutability.- Parameters:
rel
- R; R the right operand- Returns:
- A; the sum of this value and the operand
-
minus
Subtract a Relative value from this Absolute value. A new value is returned due to immutability.- Parameters:
rel
- R; R the right operand- Returns:
- A; the subtraction of this value and the operand
-
minus
Subtract an Absolute value from this Absolute value, resulting in a Relative value. A new value is returned due to immutability.- Parameters:
abs
- A; A the right operand- Returns:
- R; the subtraction of this value and the operand
-