Interface DoubleScalarInterface.RelWithAbs<AU extends AbsoluteLinearUnit<AU,​RU>,​A extends DoubleScalarInterface.Abs<AU,​A,​RU,​R>,​RU extends Unit<RU>,​R extends DoubleScalarInterface.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:
Cloneable, Comparable<R>, DoubleScalarInterface<RU,​R>, Relative<RU,​R>, Scalar<RU,​R>, Scalar.Rel<RU,​R>, Scalar.RelWithAbs<AU,​A,​RU,​R>, Serializable, Value<RU,​R>, ValueFunctions<RU,​R>
All Known Implementing Classes:
AbstractDoubleScalarRelWithAbs, Angle, Duration, Length, Temperature
Enclosing interface:
DoubleScalarInterface<U extends Unit<U>,​S extends DoubleScalarInterface<U,​S>>

public static interface DoubleScalarInterface.RelWithAbs<AU extends AbsoluteLinearUnit<AU,​RU>,​A extends DoubleScalarInterface.Abs<AU,​A,​RU,​R>,​RU extends Unit<RU>,​R extends DoubleScalarInterface.RelWithAbs<AU,​A,​RU,​R>>
extends DoubleScalarInterface<RU,​R>, Scalar.RelWithAbs<AU,​A,​RU,​R>
Additional methods for Relative Scalar that has a corresponding Absolute Scalar. An example is the relative scalar Length that has a corresponding absolute scalar Position.

Copyright (c) 2019-2019 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

    • instantiateRel

      R instantiateRel​(double value, RU unit)
      Construct a new Relative Immutable DoubleScalar of the right type. Each extending class must implement this method.
      Parameters:
      value - double; the double value
      unit - U; the unit
      Returns:
      R a new relative instance of the DoubleScalar of the right type
    • instantiateAbs

      A instantiateAbs​(double value, AU unit)
      Construct a new Absolute Immutable DoubleScalar of the right type. Each extending class must implement this method.
      Parameters:
      value - double; the double value
      unit - AU; the absolute unit
      Returns:
      A a new absolute instance of the DoubleScalar of the right type