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 absoluteunit
A - the absolute scalar belonging to the relative scalar
RU - the absolute unit belonging to the relative unit
R - 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
Enclosing interface:
Scalar<U extends Unit<U>,​S extends Scalar<U,​S>>

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-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.

Author:
Alexander Verbraeck
  • Method Details

    • 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
    • minus

      R minus​(A abs)
      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