Class ElectricalPotential

    • Constructor Detail

      • 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 Detail

      • 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

        public static ElectricalPotential max​(ElectricalPotential r1,
                                              ElectricalPotential r2)
        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

        public static ElectricalPotential max​(ElectricalPotential r1,
                                              ElectricalPotential r2,
                                              ElectricalPotential... rn)
        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

        public static ElectricalPotential min​(ElectricalPotential r1,
                                              ElectricalPotential r2)
        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

        public static ElectricalPotential min​(ElectricalPotential r1,
                                              ElectricalPotential r2,
                                              ElectricalPotential... rn)
        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