Package org.djunits.value
Interface RelWithAbs<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 Superinterfaces:
Relative<RU,
R>
- All Known Implementing Classes:
Angle
,AngleMatrix
,AngleVector
,DoubleMatrixRelWithAbs
,DoubleScalarRelWithAbs
,DoubleVectorRelWithAbs
,Duration
,DurationMatrix
,DurationVector
,FloatAngle
,FloatAngleMatrix
,FloatAngleVector
,FloatDuration
,FloatDurationMatrix
,FloatDurationVector
,FloatLength
,FloatLengthMatrix
,FloatLengthVector
,FloatMatrixRelWithAbs
,FloatScalarRelWithAbs
,FloatTemperature
,FloatTemperatureMatrix
,FloatTemperatureVector
,FloatVectorRelWithAbs
,Length
,LengthMatrix
,LengthVector
,Temperature
,TemperatureMatrix
,TemperatureVector
public interface RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Absolute<AU,A,RU,R>,RU extends Unit<RU>,R extends RelWithAbs<AU,A,RU,R>>
extends Relative<RU,R>
Relative values express differences; a RelWithAbs value represents a relative quantity that has a corresponding absolute
quantity. An example is Length that belongs to the absolute type Position. Values are Relative when adding or subtracting two
values does make sense and results in a value of that same type.
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 an Absolute value to this relative value. A new value is returned due to immutability. The unit of the result is the unit of the absolute operand.- Parameters:
abs
- A; A the right operand- Returns:
- A; the sum of this value and the operand
-