Class AngularSpeed

All Implemented Interfaces:
Serializable

public class AngularSpeed extends Measurement<AngularSpeedUnit>
Contains angular speed value and unit.
See Also:
  • Constructor Details

    • AngularSpeed

      public AngularSpeed(Number value, AngularSpeedUnit unit)
      Constructor with value and unit.
      Parameters:
      value - angular speed value.
      unit - unit of angular speed.
      Throws:
      IllegalArgumentException - if either value or unit is null.
    • AngularSpeed

      AngularSpeed()
      Constructor.
  • Method Details

    • equals

      public boolean equals(Measurement<AngularSpeedUnit> other, double tolerance)
      Determines if two angular speed values are equal up to a certain tolerance. If needed, this method attempts unit conversion to compare both objects.
      Overrides:
      equals in class Measurement<AngularSpeedUnit>
      Parameters:
      other - another measurement to compare.
      tolerance - amount of tolerance to determine whether two angular speed instances are equal or not.
      Returns:
      true if provided angular speed is assumed to be equal to this instance, false otherwise.
    • add

      public static double add(double value1, AngularSpeedUnit unit1, double value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit)
      Adds two angular speed values and units and returns the result.
      Parameters:
      value1 - 1st argument value.
      unit1 - 1st argument unit.
      value2 - 2nd argument value.
      unit2 - 2nd argument unit.
      resultUnit - unit of result to be returned.
      Returns:
      result of addition.
    • add

      public static Number add(Number value1, AngularSpeedUnit unit1, Number value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit)
      Adds two angular acceleration values and units and returns the result.
      Parameters:
      value1 - 1st argument value.
      unit1 - 1st argument unit.
      value2 - 2nd argument value.
      unit2 - 2nd argument unit.
      resultUnit - unit of result to be returned.
      Returns:
      result of addition.
    • add

      public static void add(AngularSpeed arg1, AngularSpeed arg2, AngularSpeed result)
      Adds two angular speeds and stores the result into provided instance.
      Parameters:
      arg1 - 1st argument.
      arg2 - 2nd argument.
      result - instance where result will be stored.
    • addAndReturnNew

      public static AngularSpeed addAndReturnNew(AngularSpeed arg1, AngularSpeed arg2, AngularSpeedUnit unit)
      Adds two angular speeds.
      Parameters:
      arg1 - 1st argument.
      arg2 - 2nd argument.
      unit - unit of returned angular speed.
      Returns:
      a new instance containing result.
    • addAndReturnNew

      public AngularSpeed addAndReturnNew(double value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit)
      Adds provided angular speed value and unit and returns a new angular speed instance using provided unit.
      Parameters:
      value - value to be added.
      unit - unit of value to be added.
      resultUnit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • addAndReturnNew

      public AngularSpeed addAndReturnNew(Number value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit)
      Adds provided angular speed value and unit and returns a new angular speed instance using provided unit.
      Parameters:
      value - value to be added.
      unit - unit of value to be added.
      resultUnit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • addAndReturnNew

      public AngularSpeed addAndReturnNew(AngularSpeed s, AngularSpeedUnit unit)
      Adds provided angular speed to current instance and returns a new angular speed.
      Parameters:
      s - angular speed to be added.
      unit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • add

      public void add(double value, AngularSpeedUnit unit)
      Adds provided angular speed value and unit and updates current angular speed instance.
      Parameters:
      value - angular speed value to be added.
      unit - unit of angular speed value.
    • add

      public void add(Number value, AngularSpeedUnit unit)
      Adds provided angular speed value and unit and updates current angular speed instance.
      Parameters:
      value - angular speed value to be added.
      unit - unit of angular speed value.
    • add

      public void add(AngularSpeed s)
      Adds provided angular speed and updates current angular speed.
      Parameters:
      s - angular speed to be added.
    • add

      public void add(AngularSpeed s, AngularSpeed result)
      Adds provided angular speed and stores the result into provided angular speed.
      Parameters:
      s - angular speed to be added.
      result - instance where result will be stored.
    • subtract

      public static double subtract(double value1, AngularSpeedUnit unit1, double value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit)
      Subtracts two angular speed values and units and returns the result.
      Parameters:
      value1 - 1st argument value.
      unit1 - 1st argument unit.
      value2 - 2nd argument value.
      unit2 - 2nd argument unit.
      resultUnit - unit of result to be returned.
      Returns:
      result of subtraction.
    • subtract

      public static Number subtract(Number value1, AngularSpeedUnit unit1, Number value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit)
      Subtracts two angular speed values and units and returns the result.
      Parameters:
      value1 - 1st argument value.
      unit1 - 1st argument unit.
      value2 - 2nd argument value.
      unit2 - 2nd argument unit.
      resultUnit - unit of result to be returned.
      Returns:
      result of subtraction.
    • subtract

      public static void subtract(AngularSpeed arg1, AngularSpeed arg2, AngularSpeed result)
      Subtracts two angular speeds and stores the result into provided instance.
      Parameters:
      arg1 - 1st argument.
      arg2 - 2nd argument.
      result - instance where result will be stored.
    • subtractAndReturnNew

      public static AngularSpeed subtractAndReturnNew(AngularSpeed arg1, AngularSpeed arg2, AngularSpeedUnit unit)
      Subtracts two angular speeds.
      Parameters:
      arg1 - 1st argument.
      arg2 - 2nd argument.
      unit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • subtractAndReturnNew

      public AngularSpeed subtractAndReturnNew(double value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit)
      Subtracts provided angular speed value and unit and returns a new angular speed instance using provided unit.
      Parameters:
      value - value to be subtracted.
      unit - unit of value to be subtracted.
      resultUnit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • subtractAndReturnNew

      public AngularSpeed subtractAndReturnNew(Number value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit)
      Subtracts provided angular speed value and unit and returns a new angular speed instance using provided unit.
      Parameters:
      value - value to be subtracted.
      unit - unit of value to be subtracted.
      resultUnit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • subtractAndReturnNew

      public AngularSpeed subtractAndReturnNew(AngularSpeed s, AngularSpeedUnit unit)
      Subtracts provided angular speed to current instance and returns a new angular speed.
      Parameters:
      s - angular speed to be subtracted.
      unit - unit of returned angular speed.
      Returns:
      a new angular speed containing result.
    • subtract

      public void subtract(double value, AngularSpeedUnit unit)
      Subtracts provided angular speed value and unit and updates current angular speed instance.
      Parameters:
      value - angular speed value to be subtracted.
      unit - unit of angular speed value.
    • subtract

      public void subtract(Number value, AngularSpeedUnit unit)
      Subtracts provided angular speed value and unit and updates current angular speed instance.
      Parameters:
      value - angular speed value to be subtracted.
      unit - unit of angular speed value.
    • subtract

      public void subtract(AngularSpeed s)
      Subtracts provided angular speed and updates current angular speed.
      Parameters:
      s - angular speed to be subtracted.
    • subtract

      public void subtract(AngularSpeed s, AngularSpeed result)
      Subtracts provided angular speed and stores the result into provided angular speed.
      Parameters:
      s - angular speed to be subtracted.
      result - instance where result will be stored.