Interface Relative<U extends Unit<U>,​T extends Value<U,​T>>

Type Parameters:
U - the unit type
T - the value type for this unit
All Known Subinterfaces:
DoubleScalarInterface.Rel<U,​R>, DoubleScalarInterface.RelWithAbs<AU,​A,​RU,​R>, FloatScalarInterface.Rel<U,​R>, FloatScalarInterface.RelWithAbs<AU,​A,​RU,​R>, Matrix.Rel<U,​S,​V,​RM>, Matrix.RelWithAbs<AU,​A,​AV,​AM,​RU,​R,​RV,​RM>, Scalar.Rel<U,​R>, Scalar.RelWithAbs<AU,​A,​RU,​R>, Vector.Rel<U,​S,​RV>, Vector.RelWithAbs<AU,​A,​AV,​RU,​R,​RV>
All Known Implementing Classes:
AbsorbedDose, AbsorbedDoseMatrix, AbsorbedDoseVector, AbstractDoubleMatrixRel, AbstractDoubleMatrixRelWithAbs, AbstractDoubleScalarRel, AbstractDoubleScalarRelWithAbs, AbstractDoubleVectorRel, AbstractDoubleVectorRelWithAbs, AbstractFloatMatrixRel, AbstractFloatMatrixRelWithAbs, AbstractFloatScalarRel, AbstractFloatScalarRelWithAbs, AbstractFloatVectorRel, AbstractFloatVectorRelWithAbs, Acceleration, AccelerationMatrix, AccelerationVector, AmountOfSubstance, AmountOfSubstanceMatrix, AmountOfSubstanceVector, Angle, AngleMatrix, AngleVector, Area, AreaMatrix, AreaVector, CatalyticActivity, CatalyticActivityMatrix, CatalyticActivityVector, Density, DensityMatrix, DensityVector, Dimensionless, DimensionlessMatrix, DimensionlessVector, Duration, DurationMatrix, DurationVector, ElectricalCapacitance, ElectricalCapacitanceMatrix, ElectricalCapacitanceVector, ElectricalCharge, ElectricalChargeMatrix, ElectricalChargeVector, ElectricalConductance, ElectricalConductanceMatrix, ElectricalConductanceVector, ElectricalCurrent, ElectricalCurrentMatrix, ElectricalCurrentVector, ElectricalInductance, ElectricalInductanceMatrix, ElectricalInductanceVector, ElectricalPotential, ElectricalPotentialMatrix, ElectricalPotentialVector, ElectricalResistance, ElectricalResistanceMatrix, ElectricalResistanceVector, Energy, EnergyMatrix, EnergyVector, EquivalentDose, EquivalentDoseMatrix, EquivalentDoseVector, FloatAbsorbedDose, FloatAbsorbedDoseMatrix, FloatAbsorbedDoseVector, FloatAcceleration, FloatAccelerationMatrix, FloatAccelerationVector, FloatAmountOfSubstance, FloatAmountOfSubstanceMatrix, FloatAmountOfSubstanceVector, FloatAngle, FloatAngleMatrix, FloatAngleVector, FloatArea, FloatAreaMatrix, FloatAreaVector, FloatCatalyticActivity, FloatCatalyticActivityMatrix, FloatCatalyticActivityVector, FloatDensity, FloatDensityMatrix, FloatDensityVector, FloatDimensionless, FloatDimensionlessMatrix, FloatDimensionlessVector, FloatDuration, FloatDurationMatrix, FloatDurationVector, FloatElectricalCapacitance, FloatElectricalCapacitanceMatrix, FloatElectricalCapacitanceVector, FloatElectricalCharge, FloatElectricalChargeMatrix, FloatElectricalChargeVector, FloatElectricalConductance, FloatElectricalConductanceMatrix, FloatElectricalConductanceVector, FloatElectricalCurrent, FloatElectricalCurrentMatrix, FloatElectricalCurrentVector, FloatElectricalInductance, FloatElectricalInductanceMatrix, FloatElectricalInductanceVector, FloatElectricalPotential, FloatElectricalPotentialMatrix, FloatElectricalPotentialVector, FloatElectricalResistance, FloatElectricalResistanceMatrix, FloatElectricalResistanceVector, FloatEnergy, FloatEnergyMatrix, FloatEnergyVector, FloatEquivalentDose, FloatEquivalentDoseMatrix, FloatEquivalentDoseVector, FloatFlowMass, FloatFlowMassMatrix, FloatFlowMassVector, FloatFlowVolume, FloatFlowVolumeMatrix, FloatFlowVolumeVector, FloatForce, FloatForceMatrix, FloatForceVector, FloatFrequency, FloatFrequencyMatrix, FloatFrequencyVector, FloatIlluminance, FloatIlluminanceMatrix, FloatIlluminanceVector, FloatLength, FloatLengthMatrix, FloatLengthVector, FloatLinearDensity, FloatLinearDensityMatrix, FloatLinearDensityVector, FloatLuminousFlux, FloatLuminousFluxMatrix, FloatLuminousFluxVector, FloatLuminousIntensity, FloatLuminousIntensityMatrix, FloatLuminousIntensityVector, FloatMagneticFlux, FloatMagneticFluxDensity, FloatMagneticFluxDensityMatrix, FloatMagneticFluxDensityVector, FloatMagneticFluxMatrix, FloatMagneticFluxVector, FloatMass, FloatMassMatrix, FloatMassVector, FloatPower, FloatPowerMatrix, FloatPowerVector, FloatPressure, FloatPressureMatrix, FloatPressureVector, FloatRadioActivity, FloatRadioActivityMatrix, FloatRadioActivityVector, FloatSIMatrix, FloatSIScalar, FloatSIVector, FloatSolidAngle, FloatSolidAngleMatrix, FloatSolidAngleVector, FloatSpeed, FloatSpeedMatrix, FloatSpeedVector, FloatTemperature, FloatTemperatureMatrix, FloatTemperatureVector, FloatTorque, FloatTorqueMatrix, FloatTorqueVector, FloatVolume, FloatVolumeMatrix, FloatVolumeVector, FlowMass, FlowMassMatrix, FlowMassVector, FlowVolume, FlowVolumeMatrix, FlowVolumeVector, Force, ForceMatrix, ForceVector, Frequency, FrequencyMatrix, FrequencyVector, Illuminance, IlluminanceMatrix, IlluminanceVector, Length, LengthMatrix, LengthVector, LinearDensity, LinearDensityMatrix, LinearDensityVector, LuminousFlux, LuminousFluxMatrix, LuminousFluxVector, LuminousIntensity, LuminousIntensityMatrix, LuminousIntensityVector, MagneticFlux, MagneticFluxDensity, MagneticFluxDensityMatrix, MagneticFluxDensityVector, MagneticFluxMatrix, MagneticFluxVector, Mass, MassMatrix, MassVector, Power, PowerMatrix, PowerVector, Pressure, PressureMatrix, PressureVector, RadioActivity, RadioActivityMatrix, RadioActivityVector, SIMatrix, SIScalar, SIVector, SolidAngle, SolidAngleMatrix, SolidAngleVector, Speed, SpeedMatrix, SpeedVector, Temperature, TemperatureMatrix, TemperatureVector, Torque, TorqueMatrix, TorqueVector, Volume, VolumeMatrix, VolumeVector

public interface Relative<U extends Unit<U>,​T extends Value<U,​T>>
Relative values express differences.
Values are Relative when adding or subtracting two values does make sense and results in a value of that same type.

Copyright (c) 2015-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, Peter Knoppers
  • Method Summary

    Modifier and Type Method Description
    T divide​(double divisor)
    Returns a new scalar/vector/matrix with value(s) divided by a factor.
    T divide​(float divisor)
    Returns a new scalar/vector/matrix with value(s) divided by a factor.
    T times​(double multiplier)
    Returns a new scalar/vector/matrix with value(s) multiplied by a factor.
    T times​(float multiplier)
    Returns a new scalar/vector/matrix with value(s) multiplied by a factor.
  • Method Details

    • times

      T times​(double multiplier)
      Returns a new scalar/vector/matrix with value(s) multiplied by a factor.
      Parameters:
      multiplier - double; the multiplier
      Returns:
      T; a new scalar/vector/matrix
    • divide

      T divide​(double divisor)
      Returns a new scalar/vector/matrix with value(s) divided by a factor.
      Parameters:
      divisor - double; the divisor
      Returns:
      T; the modified T
    • times

      T times​(float multiplier)
      Returns a new scalar/vector/matrix with value(s) multiplied by a factor.
      Parameters:
      multiplier - float; the multiplier
      Returns:
      T; a new scalar/vector/matrix
    • divide

      T divide​(float divisor)
      Returns a new scalar/vector/matrix with value(s) divided by a factor.
      Parameters:
      divisor - float; the divisor
      Returns:
      T; the modified T