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 type
A - the absolute value type
RU - the relative unit type
R - 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

    Modifier and Type
    Method
    Description
    minus(A abs)
    Subtract an Absolute value from this Absolute value, resulting in a Relative value.
    minus(R rel)
    Subtract a Relative value from this Absolute value.
    plus(R rel)
    Add a Relative value to this Absolute value.
  • 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