Package org.djunits.value.base
Interface Scalar.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>>
-
- Type Parameters:
AU- the absolute unit belonging to the absoluteunitA- the absolute scalar belonging to the relative scalarRU- the absolute unit belonging to the relative unitR- the relative scalar belonging to the absolute scalar
- All Superinterfaces:
Absolute,Cloneable,Comparable<A>,Scalar<AU,A>,Serializable,Value<AU,A>,ValueFunctions<AU,A>
- All Known Subinterfaces:
DoubleScalarInterface.Abs<AU,A,RU,R>,FloatScalarInterface.Abs<AU,A,RU,R>
- All Known Implementing Classes:
AbsoluteTemperature,AbstractDoubleScalarAbs,AbstractFloatScalarAbs,Direction,FloatAbsoluteTemperature,FloatDirection,FloatPosition,FloatTime,Position,Time
public static interface Scalar.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>> extends Scalar<AU,A>, Absolute
Methods for Absolute Scalar.Copyright (c) 2019-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.- Author:
- Alexander Verbraeck
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.djunits.value.base.Scalar
Scalar.Abs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>>, Scalar.Rel<U extends Unit<U>,R extends Scalar.Rel<U,R>>, Scalar.RelWithAbs<AU extends AbsoluteLinearUnit<AU,RU>,A extends Scalar.Abs<AU,A,RU,R>,RU extends Unit<RU>,R extends Scalar.RelWithAbs<AU,A,RU,R>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rminus(A abs)Subtract an Absolute value from this Absolute value, resulting in a Relative value.Aminus(R rel)Subtract a Relative value from this Absolute value.Aplus(R rel)Add a Relative value to this Absolute value.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.djunits.value.base.Scalar
eq, eq0, ge, ge0, gt, gt0, le, le0, lt, lt0, ne, ne0, toDisplayString, toDisplayString, toTextualString, toTextualString
-
Methods inherited from interface org.djunits.value.Value
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit, toString, toString, toString, toString
-
-
-
-
Method Detail
-
plus
A plus(R rel)
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
A minus(R rel)
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
-
-