Package com.irurueta.units
Class AngularSpeed
- All Implemented Interfaces:
Serializable
Contains angular speed value and unit.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.AngularSpeed(Number value, AngularSpeedUnit unit) Constructor with value and unit. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value, AngularSpeedUnit unit) Adds provided angular speed value and unit and updates current angular speed instance.static doubleadd(double value1, AngularSpeedUnit unit1, double value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit) Adds two angular speed values and units and returns the result.voidadd(AngularSpeed s) Adds provided angular speed and updates current angular speed.voidadd(AngularSpeed s, AngularSpeed result) Adds provided angular speed and stores the result into provided angular speed.static voidadd(AngularSpeed arg1, AngularSpeed arg2, AngularSpeed result) Adds two angular speeds and stores the result into provided instance.voidadd(Number value, AngularSpeedUnit unit) Adds provided angular speed value and unit and updates current angular speed instance.static Numberadd(Number value1, AngularSpeedUnit unit1, Number value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit) Adds two angular acceleration values and units and returns the result.addAndReturnNew(double value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit) Adds provided angular speed value and unit and returns a new angular speed instance using provided unit.static AngularSpeedaddAndReturnNew(AngularSpeed arg1, AngularSpeed arg2, AngularSpeedUnit unit) Adds two angular speeds.addAndReturnNew(AngularSpeed s, AngularSpeedUnit unit) Adds provided angular speed to current instance and returns a new angular speed.addAndReturnNew(Number value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit) Adds provided angular speed value and unit and returns a new angular speed instance using provided unit.booleanequals(Measurement<AngularSpeedUnit> other, double tolerance) Determines if two angular speed values are equal up to a certain tolerance.voidsubtract(double value, AngularSpeedUnit unit) Subtracts provided angular speed value and unit and updates current angular speed instance.static doublesubtract(double value1, AngularSpeedUnit unit1, double value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit) Subtracts two angular speed values and units and returns the result.voidSubtracts provided angular speed and updates current angular speed.voidsubtract(AngularSpeed s, AngularSpeed result) Subtracts provided angular speed and stores the result into provided angular speed.static voidsubtract(AngularSpeed arg1, AngularSpeed arg2, AngularSpeed result) Subtracts two angular speeds and stores the result into provided instance.voidsubtract(Number value, AngularSpeedUnit unit) Subtracts provided angular speed value and unit and updates current angular speed instance.static Numbersubtract(Number value1, AngularSpeedUnit unit1, Number value2, AngularSpeedUnit unit2, AngularSpeedUnit resultUnit) Subtracts two angular speed values and units and returns the result.subtractAndReturnNew(double value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit) Subtracts provided angular speed value and unit and returns a new angular speed instance using provided unit.static AngularSpeedsubtractAndReturnNew(AngularSpeed arg1, AngularSpeed arg2, AngularSpeedUnit unit) Subtracts two angular speeds.Subtracts provided angular speed to current instance and returns a new angular speed.subtractAndReturnNew(Number value, AngularSpeedUnit unit, AngularSpeedUnit resultUnit) Subtracts provided angular speed value and unit and returns a new angular speed instance using provided unit.
-
Constructor Details
-
AngularSpeed
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
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:
equalsin classMeasurement<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
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
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
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
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
Adds provided angular speed and updates current angular speed.- Parameters:
s- angular speed to be added.
-
add
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
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
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
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
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
Subtracts provided angular speed and updates current angular speed.- Parameters:
s- angular speed to be subtracted.
-
subtract
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.
-