Class FloatSIScalar

All Implemented Interfaces:
Serializable, Cloneable, Comparable<FloatSIScalar>, Scalar<SIUnit,​FloatSIScalar>, Scalar.Rel<SIUnit,​FloatSIScalar>, ValueFunctions<SIUnit,​FloatSIScalar>, Relative<SIUnit,​FloatSIScalar>, Value<SIUnit,​FloatSIScalar>, FloatScalarInterface<SIUnit,​FloatSIScalar>, FloatScalarInterface.Rel<SIUnit,​FloatSIScalar>

@Generated(value="org.djunits.generator.GenerateDJUNIT",
           date="2020-01-19T15:21:24.964166400Z")
public class FloatSIScalar
extends AbstractFloatScalarRel<SIUnit,​FloatSIScalar>
Easy access methods for the generic Relative SI FloatScalar.

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers
See Also:
Serialized Form
  • Constructor Details

    • FloatSIScalar

      public FloatSIScalar​(float value, SIUnit unit)
      Construct SI scalar.
      Parameters:
      value - float; the float value
      unit - SIUnit; unit for the float value
    • FloatSIScalar

      public FloatSIScalar​(FloatSIScalar value)
      Construct SI scalar.
      Parameters:
      value - FloatSIScalar; Scalar from which to construct this instance
  • Method Details

    • instantiateRel

      public final FloatSIScalar instantiateRel​(float value, SIUnit unit)
      Construct a new Relative Immutable FloatScalar of the right type. Each extending class must implement this method.
      Parameters:
      value - float; the float value
      unit - U; the unit
      Returns:
      R a new relative instance of the FloatScalar of the right type
    • instantiateSI

      public static final FloatSIScalar instantiateSI​(float value, SIUnit unit)
      Construct SI scalar.
      Parameters:
      value - float; the float value in SI units
      unit - SIUnit; the unit to use for the SI scalar
      Returns:
      FloatSIScalar; the new scalar with the SI value
    • interpolate

      public static FloatSIScalar interpolate​(FloatSIScalar zero, FloatSIScalar one, float ratio)
      Interpolate between two values.
      Parameters:
      zero - FloatSIScalar; the low value
      one - FloatSIScalar; the high value
      ratio - float; the ratio between 0 and 1, inclusive
      Returns:
      FloatSIScalar; a Scalar at the ratio between
    • max

      public static FloatSIScalar max​(FloatSIScalar r1, FloatSIScalar r2)
      Return the maximum value of two relative scalars.
      Parameters:
      r1 - FloatSIScalar; the first scalar
      r2 - FloatSIScalar; the second scalar
      Returns:
      FloatSIScalar; the maximum value of two relative scalars
    • max

      public static FloatSIScalar max​(FloatSIScalar r1, FloatSIScalar r2, FloatSIScalar... rn)
      Return the maximum value of more than two relative scalars.
      Parameters:
      r1 - FloatSIScalar; the first scalar
      r2 - FloatSIScalar; the second scalar
      rn - FloatSIScalar...; the other scalars
      Returns:
      FloatSIScalar; the maximum value of more than two relative scalars
    • min

      public static FloatSIScalar min​(FloatSIScalar r1, FloatSIScalar r2)
      Return the minimum value of two relative scalars.
      Parameters:
      r1 - FloatSIScalar; the first scalar
      r2 - FloatSIScalar; the second scalar
      Returns:
      FloatSIScalar; the minimum value of two relative scalars
    • min

      public static FloatSIScalar min​(FloatSIScalar r1, FloatSIScalar r2, FloatSIScalar... rn)
      Return the minimum value of more than two relative scalars.
      Parameters:
      r1 - FloatSIScalar; the first scalar
      r2 - FloatSIScalar; the second scalar
      rn - FloatSIScalar...; the other scalars
      Returns:
      FloatSIScalar; the minimum value of more than two relative scalars
    • valueOf

      public static FloatSIScalar valueOf​(String text)
      Returns an FloatSIScalar representation of a textual representation of a value with a unit. The String representation that can be parsed is the float value in the unit, followed by the official abbreviation of the unit. Spaces are allowed, but not required, between the value and the unit.
      Parameters:
      text - String; the textual representation to parse into a FloatSIScalar
      Returns:
      FloatSIScalar; the Scalar representation of the value in its unit
      Throws:
      IllegalArgumentException - when the text cannot be parsed
      NullPointerException - when the text argument is null
    • of

      public static FloatSIScalar of​(float value, String unitString)
      Returns an FloatSIScalar based on a value and the textual representation of the unit.
      Parameters:
      value - float; the value to use
      unitString - String; the textual representation of the unit
      Returns:
      FloatSIScalar; the Scalar representation of the value in its unit
      Throws:
      IllegalArgumentException - when the unit cannot be parsed or is incorrect
      NullPointerException - when the unitString argument is null
    • as

      public final <U extends Unit<U>,​ S extends AbstractFloatScalarRel<U,​ S>> S as​(U displayUnit)
      Return the current scalar transformed to a scalar in the given unit. Of course the SI dimensionality has to match, otherwise the scalar cannot be transformed. The compiler will check the alignment between the return value and the unit.
      Type Parameters:
      U - the unit type
      S - the scalar type
      Parameters:
      displayUnit - KU; the unit in which the scalar needs to be expressed
      Returns:
      S; the scalar that has been transformed into the right scalar type and unit
    • asAbsorbedDose

      public final FloatAbsorbedDose asAbsorbedDose()
      Return the current scalar as a absorbeddose.
      Returns:
      FloatAbsorbedDose; the current scalar as a absorbeddose
    • asAbsorbedDose

      public final FloatAbsorbedDose asAbsorbedDose​(AbsorbedDoseUnit displayUnit)
      Return the current scalar as a absorbeddose, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAbsorbedDose; the current scalar as a absorbeddose
    • asAcceleration

      public final FloatAcceleration asAcceleration()
      Return the current scalar as a acceleration.
      Returns:
      FloatAcceleration; the current scalar as a acceleration
    • asAcceleration

      public final FloatAcceleration asAcceleration​(AccelerationUnit displayUnit)
      Return the current scalar as a acceleration, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAcceleration; the current scalar as a acceleration
    • asAmountOfSubstance

      public final FloatAmountOfSubstance asAmountOfSubstance()
      Return the current scalar as a amountofsubstance.
      Returns:
      FloatAmountOfSubstance; the current scalar as a amountofsubstance
    • asAmountOfSubstance

      public final FloatAmountOfSubstance asAmountOfSubstance​(AmountOfSubstanceUnit displayUnit)
      Return the current scalar as a amountofsubstance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAmountOfSubstance; the current scalar as a amountofsubstance
    • asAngularAcceleration

      public final FloatAngularAcceleration asAngularAcceleration()
      Return the current scalar as a angularacceleration.
      Returns:
      FloatAngularAcceleration; the current scalar as a angularacceleration
    • asAngularAcceleration

      public final FloatAngularAcceleration asAngularAcceleration​(AngularAccelerationUnit displayUnit)
      Return the current scalar as a angularacceleration, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAngularAcceleration; the current scalar as a angularacceleration
    • asAngularVelocity

      public final FloatAngularVelocity asAngularVelocity()
      Return the current scalar as a angularvelocity.
      Returns:
      FloatAngularVelocity; the current scalar as a angularvelocity
    • asAngularVelocity

      public final FloatAngularVelocity asAngularVelocity​(AngularVelocityUnit displayUnit)
      Return the current scalar as a angularvelocity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAngularVelocity; the current scalar as a angularvelocity
    • asArea

      public final FloatArea asArea()
      Return the current scalar as a area.
      Returns:
      FloatArea; the current scalar as a area
    • asArea

      public final FloatArea asArea​(AreaUnit displayUnit)
      Return the current scalar as a area, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatArea; the current scalar as a area
    • asCatalyticActivity

      public final FloatCatalyticActivity asCatalyticActivity()
      Return the current scalar as a catalyticactivity.
      Returns:
      FloatCatalyticActivity; the current scalar as a catalyticactivity
    • asCatalyticActivity

      public final FloatCatalyticActivity asCatalyticActivity​(CatalyticActivityUnit displayUnit)
      Return the current scalar as a catalyticactivity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatCatalyticActivity; the current scalar as a catalyticactivity
    • asDensity

      public final FloatDensity asDensity()
      Return the current scalar as a density.
      Returns:
      FloatDensity; the current scalar as a density
    • asDensity

      public final FloatDensity asDensity​(DensityUnit displayUnit)
      Return the current scalar as a density, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatDensity; the current scalar as a density
    • asDimensionless

      public final FloatDimensionless asDimensionless()
      Return the current scalar as a dimensionless.
      Returns:
      FloatDimensionless; the current scalar as a dimensionless
    • asDimensionless

      public final FloatDimensionless asDimensionless​(DimensionlessUnit displayUnit)
      Return the current scalar as a dimensionless, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatDimensionless; the current scalar as a dimensionless
    • asElectricalCapacitance

      public final FloatElectricalCapacitance asElectricalCapacitance()
      Return the current scalar as a electricalcapacitance.
      Returns:
      FloatElectricalCapacitance; the current scalar as a electricalcapacitance
    • asElectricalCapacitance

      public final FloatElectricalCapacitance asElectricalCapacitance​(ElectricalCapacitanceUnit displayUnit)
      Return the current scalar as a electricalcapacitance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalCapacitance; the current scalar as a electricalcapacitance
    • asElectricalCharge

      public final FloatElectricalCharge asElectricalCharge()
      Return the current scalar as a electricalcharge.
      Returns:
      FloatElectricalCharge; the current scalar as a electricalcharge
    • asElectricalCharge

      public final FloatElectricalCharge asElectricalCharge​(ElectricalChargeUnit displayUnit)
      Return the current scalar as a electricalcharge, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalCharge; the current scalar as a electricalcharge
    • asElectricalConductance

      public final FloatElectricalConductance asElectricalConductance()
      Return the current scalar as a electricalconductance.
      Returns:
      FloatElectricalConductance; the current scalar as a electricalconductance
    • asElectricalConductance

      public final FloatElectricalConductance asElectricalConductance​(ElectricalConductanceUnit displayUnit)
      Return the current scalar as a electricalconductance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalConductance; the current scalar as a electricalconductance
    • asElectricalCurrent

      public final FloatElectricalCurrent asElectricalCurrent()
      Return the current scalar as a electricalcurrent.
      Returns:
      FloatElectricalCurrent; the current scalar as a electricalcurrent
    • asElectricalCurrent

      public final FloatElectricalCurrent asElectricalCurrent​(ElectricalCurrentUnit displayUnit)
      Return the current scalar as a electricalcurrent, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalCurrent; the current scalar as a electricalcurrent
    • asElectricalInductance

      public final FloatElectricalInductance asElectricalInductance()
      Return the current scalar as a electricalinductance.
      Returns:
      FloatElectricalInductance; the current scalar as a electricalinductance
    • asElectricalInductance

      public final FloatElectricalInductance asElectricalInductance​(ElectricalInductanceUnit displayUnit)
      Return the current scalar as a electricalinductance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalInductance; the current scalar as a electricalinductance
    • asElectricalPotential

      public final FloatElectricalPotential asElectricalPotential()
      Return the current scalar as a electricalpotential.
      Returns:
      FloatElectricalPotential; the current scalar as a electricalpotential
    • asElectricalPotential

      public final FloatElectricalPotential asElectricalPotential​(ElectricalPotentialUnit displayUnit)
      Return the current scalar as a electricalpotential, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalPotential; the current scalar as a electricalpotential
    • asElectricalResistance

      public final FloatElectricalResistance asElectricalResistance()
      Return the current scalar as a electricalresistance.
      Returns:
      FloatElectricalResistance; the current scalar as a electricalresistance
    • asElectricalResistance

      public final FloatElectricalResistance asElectricalResistance​(ElectricalResistanceUnit displayUnit)
      Return the current scalar as a electricalresistance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatElectricalResistance; the current scalar as a electricalresistance
    • asEnergy

      public final FloatEnergy asEnergy()
      Return the current scalar as a energy.
      Returns:
      FloatEnergy; the current scalar as a energy
    • asEnergy

      public final FloatEnergy asEnergy​(EnergyUnit displayUnit)
      Return the current scalar as a energy, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatEnergy; the current scalar as a energy
    • asEquivalentDose

      public final FloatEquivalentDose asEquivalentDose()
      Return the current scalar as a equivalentdose.
      Returns:
      FloatEquivalentDose; the current scalar as a equivalentdose
    • asEquivalentDose

      public final FloatEquivalentDose asEquivalentDose​(EquivalentDoseUnit displayUnit)
      Return the current scalar as a equivalentdose, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatEquivalentDose; the current scalar as a equivalentdose
    • asFlowMass

      public final FloatFlowMass asFlowMass()
      Return the current scalar as a flowmass.
      Returns:
      FloatFlowMass; the current scalar as a flowmass
    • asFlowMass

      public final FloatFlowMass asFlowMass​(FlowMassUnit displayUnit)
      Return the current scalar as a flowmass, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatFlowMass; the current scalar as a flowmass
    • asFlowVolume

      public final FloatFlowVolume asFlowVolume()
      Return the current scalar as a flowvolume.
      Returns:
      FloatFlowVolume; the current scalar as a flowvolume
    • asFlowVolume

      public final FloatFlowVolume asFlowVolume​(FlowVolumeUnit displayUnit)
      Return the current scalar as a flowvolume, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatFlowVolume; the current scalar as a flowvolume
    • asForce

      public final FloatForce asForce()
      Return the current scalar as a force.
      Returns:
      FloatForce; the current scalar as a force
    • asForce

      public final FloatForce asForce​(ForceUnit displayUnit)
      Return the current scalar as a force, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatForce; the current scalar as a force
    • asFrequency

      public final FloatFrequency asFrequency()
      Return the current scalar as a frequency.
      Returns:
      FloatFrequency; the current scalar as a frequency
    • asFrequency

      public final FloatFrequency asFrequency​(FrequencyUnit displayUnit)
      Return the current scalar as a frequency, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatFrequency; the current scalar as a frequency
    • asIlluminance

      public final FloatIlluminance asIlluminance()
      Return the current scalar as a illuminance.
      Returns:
      FloatIlluminance; the current scalar as a illuminance
    • asIlluminance

      public final FloatIlluminance asIlluminance​(IlluminanceUnit displayUnit)
      Return the current scalar as a illuminance, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatIlluminance; the current scalar as a illuminance
    • asLinearDensity

      public final FloatLinearDensity asLinearDensity()
      Return the current scalar as a lineardensity.
      Returns:
      FloatLinearDensity; the current scalar as a lineardensity
    • asLinearDensity

      public final FloatLinearDensity asLinearDensity​(LinearDensityUnit displayUnit)
      Return the current scalar as a lineardensity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatLinearDensity; the current scalar as a lineardensity
    • asLuminousFlux

      public final FloatLuminousFlux asLuminousFlux()
      Return the current scalar as a luminousflux.
      Returns:
      FloatLuminousFlux; the current scalar as a luminousflux
    • asLuminousFlux

      public final FloatLuminousFlux asLuminousFlux​(LuminousFluxUnit displayUnit)
      Return the current scalar as a luminousflux, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatLuminousFlux; the current scalar as a luminousflux
    • asLuminousIntensity

      public final FloatLuminousIntensity asLuminousIntensity()
      Return the current scalar as a luminousintensity.
      Returns:
      FloatLuminousIntensity; the current scalar as a luminousintensity
    • asLuminousIntensity

      public final FloatLuminousIntensity asLuminousIntensity​(LuminousIntensityUnit displayUnit)
      Return the current scalar as a luminousintensity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatLuminousIntensity; the current scalar as a luminousintensity
    • asMagneticFluxDensity

      public final FloatMagneticFluxDensity asMagneticFluxDensity()
      Return the current scalar as a magneticfluxdensity.
      Returns:
      FloatMagneticFluxDensity; the current scalar as a magneticfluxdensity
    • asMagneticFluxDensity

      public final FloatMagneticFluxDensity asMagneticFluxDensity​(MagneticFluxDensityUnit displayUnit)
      Return the current scalar as a magneticfluxdensity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatMagneticFluxDensity; the current scalar as a magneticfluxdensity
    • asMagneticFlux

      public final FloatMagneticFlux asMagneticFlux()
      Return the current scalar as a magneticflux.
      Returns:
      FloatMagneticFlux; the current scalar as a magneticflux
    • asMagneticFlux

      public final FloatMagneticFlux asMagneticFlux​(MagneticFluxUnit displayUnit)
      Return the current scalar as a magneticflux, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatMagneticFlux; the current scalar as a magneticflux
    • asMass

      public final FloatMass asMass()
      Return the current scalar as a mass.
      Returns:
      FloatMass; the current scalar as a mass
    • asMass

      public final FloatMass asMass​(MassUnit displayUnit)
      Return the current scalar as a mass, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatMass; the current scalar as a mass
    • asMomentum

      public final FloatMomentum asMomentum()
      Return the current scalar as a momentum.
      Returns:
      FloatMomentum; the current scalar as a momentum
    • asMomentum

      public final FloatMomentum asMomentum​(MomentumUnit displayUnit)
      Return the current scalar as a momentum, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatMomentum; the current scalar as a momentum
    • asPower

      public final FloatPower asPower()
      Return the current scalar as a power.
      Returns:
      FloatPower; the current scalar as a power
    • asPower

      public final FloatPower asPower​(PowerUnit displayUnit)
      Return the current scalar as a power, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatPower; the current scalar as a power
    • asPressure

      public final FloatPressure asPressure()
      Return the current scalar as a pressure.
      Returns:
      FloatPressure; the current scalar as a pressure
    • asPressure

      public final FloatPressure asPressure​(PressureUnit displayUnit)
      Return the current scalar as a pressure, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatPressure; the current scalar as a pressure
    • asRadioActivity

      public final FloatRadioActivity asRadioActivity()
      Return the current scalar as a radioactivity.
      Returns:
      FloatRadioActivity; the current scalar as a radioactivity
    • asRadioActivity

      public final FloatRadioActivity asRadioActivity​(RadioActivityUnit displayUnit)
      Return the current scalar as a radioactivity, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatRadioActivity; the current scalar as a radioactivity
    • asSolidAngle

      public final FloatSolidAngle asSolidAngle()
      Return the current scalar as a solidangle.
      Returns:
      FloatSolidAngle; the current scalar as a solidangle
    • asSolidAngle

      public final FloatSolidAngle asSolidAngle​(SolidAngleUnit displayUnit)
      Return the current scalar as a solidangle, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatSolidAngle; the current scalar as a solidangle
    • asSpeed

      public final FloatSpeed asSpeed()
      Return the current scalar as a speed.
      Returns:
      FloatSpeed; the current scalar as a speed
    • asSpeed

      public final FloatSpeed asSpeed​(SpeedUnit displayUnit)
      Return the current scalar as a speed, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatSpeed; the current scalar as a speed
    • asTorque

      public final FloatTorque asTorque()
      Return the current scalar as a torque.
      Returns:
      FloatTorque; the current scalar as a torque
    • asTorque

      public final FloatTorque asTorque​(TorqueUnit displayUnit)
      Return the current scalar as a torque, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatTorque; the current scalar as a torque
    • asVolume

      public final FloatVolume asVolume()
      Return the current scalar as a volume.
      Returns:
      FloatVolume; the current scalar as a volume
    • asVolume

      public final FloatVolume asVolume​(VolumeUnit displayUnit)
      Return the current scalar as a volume, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatVolume; the current scalar as a volume
    • asAngle

      public final FloatAngle asAngle()
      Return the current scalar as a angle.
      Returns:
      FloatAngle; the current scalar as a angle
    • asAngle

      public final FloatAngle asAngle​(AngleUnit displayUnit)
      Return the current scalar as a angle, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatAngle; the current scalar as a angle
    • asLength

      public final FloatLength asLength()
      Return the current scalar as a length.
      Returns:
      FloatLength; the current scalar as a length
    • asLength

      public final FloatLength asLength​(LengthUnit displayUnit)
      Return the current scalar as a length, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatLength; the current scalar as a length
    • asTemperature

      public final FloatTemperature asTemperature()
      Return the current scalar as a temperature.
      Returns:
      FloatTemperature; the current scalar as a temperature
    • asTemperature

      public final FloatTemperature asTemperature​(TemperatureUnit displayUnit)
      Return the current scalar as a temperature, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatTemperature; the current scalar as a temperature
    • asDuration

      public final FloatDuration asDuration()
      Return the current scalar as a duration.
      Returns:
      FloatDuration; the current scalar as a duration
    • asDuration

      public final FloatDuration asDuration​(DurationUnit displayUnit)
      Return the current scalar as a duration, and provide a display unit.
      Parameters:
      displayUnit - the unit in which the value will be displayed
      Returns:
      FloatDuration; the current scalar as a duration