Class ElectricalPotential

All Implemented Interfaces:
Serializable, Cloneable, Comparable<ElectricalPotential>, Scalar<ElectricalPotentialUnit,​ElectricalPotential>, Scalar.Rel<ElectricalPotentialUnit,​ElectricalPotential>, ValueFunctions<ElectricalPotentialUnit,​ElectricalPotential>, Relative<ElectricalPotentialUnit,​ElectricalPotential>, Value<ElectricalPotentialUnit,​ElectricalPotential>, DoubleScalarInterface<ElectricalPotentialUnit,​ElectricalPotential>, DoubleScalarInterface.Rel<ElectricalPotentialUnit,​ElectricalPotential>

@Generated(value="org.djunits.generator.GenerateDJUNIT",
           date="2019-10-18T12:12:25.568Z")
public class ElectricalPotential
extends AbstractDoubleScalarRel<ElectricalPotentialUnit,​ElectricalPotential>
Easy access methods for the ElectricalPotential DoubleScalar, which is relative by definition.

Copyright (c) 2013-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
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • ElectricalPotential

      public ElectricalPotential​(double value, ElectricalPotentialUnit unit)
      Construct ElectricalPotential scalar.
      Parameters:
      value - double; the double value
      unit - ElectricalPotentialUnit; unit for the double value
    • ElectricalPotential

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

    • instantiateRel

      public final ElectricalPotential instantiateRel​(double value, ElectricalPotentialUnit 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
    • instantiateSI

      public static final ElectricalPotential instantiateSI​(double value)
      Construct ElectricalPotential scalar.
      Parameters:
      value - double; the double value in SI units
      Returns:
      ElectricalPotential; the new scalar with the SI value
    • interpolate

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

      Return the maximum value of two relative scalars.
      Parameters:
      r1 - ElectricalPotential; the first scalar
      r2 - ElectricalPotential; the second scalar
      Returns:
      ElectricalPotential; the maximum value of two relative scalars
    • max

      Return the maximum value of more than two relative scalars.
      Parameters:
      r1 - ElectricalPotential; the first scalar
      r2 - ElectricalPotential; the second scalar
      rn - ElectricalPotential...; the other scalars
      Returns:
      ElectricalPotential; the maximum value of more than two relative scalars
    • min

      Return the minimum value of two relative scalars.
      Parameters:
      r1 - ElectricalPotential; the first scalar
      r2 - ElectricalPotential; the second scalar
      Returns:
      ElectricalPotential; the minimum value of two relative scalars
    • min

      Return the minimum value of more than two relative scalars.
      Parameters:
      r1 - ElectricalPotential; the first scalar
      r2 - ElectricalPotential; the second scalar
      rn - ElectricalPotential...; the other scalars
      Returns:
      ElectricalPotential; the minimum value of more than two relative scalars
    • valueOf

      public static ElectricalPotential valueOf​(String text)
      Returns a ElectricalPotential representation of a textual representation of a value with a unit. The String representation that can be parsed is the double 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 ElectricalPotential
      Returns:
      ElectricalPotential; 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 ElectricalPotential of​(double value, String unitString)
      Returns a ElectricalPotential based on a value and the textual representation of the unit.
      Parameters:
      value - double; the value to use
      unitString - String; the textual representation of the unit
      Returns:
      ElectricalPotential; 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
    • divide

      public final Dimensionless divide​(ElectricalPotential v)
      Calculate the division of ElectricalPotential and ElectricalPotential, which results in a Dimensionless scalar.
      Parameters:
      v - ElectricalPotential scalar
      Returns:
      Dimensionless scalar as a division of ElectricalPotential and ElectricalPotential
    • times

      public final Power times​(ElectricalCurrent v)
      Calculate the multiplication of ElectricalPotential and ElectricalCurrent, which results in a Power scalar.
      Parameters:
      v - ElectricalPotential scalar
      Returns:
      Power scalar as a multiplication of ElectricalPotential and ElectricalCurrent
    • divide

      public final ElectricalResistance divide​(ElectricalCurrent v)
      Calculate the division of ElectricalPotential and ElectricalCurrent, which results in a ElectricalResistance scalar.
      Parameters:
      v - ElectricalPotential scalar
      Returns:
      ElectricalResistance scalar as a division of ElectricalPotential and ElectricalCurrent
    • divide

      public final ElectricalCurrent divide​(ElectricalResistance v)
      Calculate the division of ElectricalPotential and ElectricalResistance, which results in a ElectricalCurrent scalar.
      Parameters:
      v - ElectricalPotential scalar
      Returns:
      ElectricalCurrent scalar as a division of ElectricalPotential and ElectricalResistance
    • times

      public final MagneticFlux times​(Duration v)
      Calculate the multiplication of ElectricalPotential and Duration, which results in a MagneticFlux scalar.
      Parameters:
      v - ElectricalPotential scalar
      Returns:
      MagneticFlux scalar as a multiplication of ElectricalPotential and Duration