Package edu.wpi.first.units.measure
Record Class Force
java.lang.Object
java.lang.Record
edu.wpi.first.units.measure.Force
- All Implemented Interfaces:
Measure<ForceUnit>,Comparable<Measure<ForceUnit>>
-
Field Summary
Fields inherited from interface edu.wpi.first.units.Measure
EQUIVALENCE_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseUnit()A convenience method to get the base unit of the measurement.doubleReturns the value of thebaseUnitMagnituderecord component.div(double divisor) Divides this measure by a unitless scalar and returns the result.div(Acceleration<?> divisor) Divides this measure by a generic acceleration and returns the result in the most appropriate unit.Divides this measure by an angle and returns the result in the most appropriate unit.div(AngularAcceleration divisor) Divides this measure by an angular acceleration and returns the result in the most appropriate unit.div(AngularMomentum divisor) Divides this measure by an angular momentum and returns the result in the most appropriate unit.div(AngularVelocity divisor) Divides this measure by an angular velocity and returns the result in the most appropriate unit.Divides this measure by an electric current and returns the result in the most appropriate unit.div(Dimensionless divisor) Divides this measure by a dimensionless scalar and returns the result.Divides this measure by a distance and returns the result in the most appropriate unit.Divides this measure by an energy and returns the result in the most appropriate unit.Divides this measure by a force and returns the result in the most appropriate unit.Divides this measure by a frequency and returns the result in the most appropriate unit.div(LinearAcceleration divisor) Divides this measure by a linear acceleration and returns the result in the most appropriate unit.div(LinearMomentum divisor) Divides this measure by a linear momentum and returns the result in the most appropriate unit.div(LinearVelocity divisor) Divides this measure by a linear velocity and returns the result in the most appropriate unit.Divides this measure by a mass and returns the result in the most appropriate unit.div(MomentOfInertia divisor) Divides this measure by a moment of inertia and returns the result in the most appropriate unit.Divides this measure by a generic multiplication and returns the result in the most appropriate unit.Divides this measure by a generic ratio and returns the result in the most appropriate unit.Divides this measure by a power and returns the result in the most appropriate unit.div(Resistance divisor) Divides this measure by a resistance and returns the result in the most appropriate unit.div(Temperature divisor) Divides this measure by a temperature and returns the result in the most appropriate unit.Divides this measure by a time and returns the result in the most appropriate unit.Divides this measure by a torque and returns the result in the most appropriate unit.Per<ForceUnit, VelocityUnit<?>> Divides this measure by a generic velocity and returns the result in the most appropriate unit.Divides this measure by a voltage and returns the result in the most appropriate unit.divide(double divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(Acceleration<?> divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(AngularAcceleration divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(AngularMomentum divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(AngularVelocity divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(Dimensionless divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(LinearAcceleration divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(LinearMomentum divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(LinearVelocity divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(MomentOfInertia divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(Resistance divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.divide(Temperature divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Per<ForceUnit, VelocityUnit<?>> Deprecated, for removal: This API element is subject to removal in a future version.use div instead.Deprecated, for removal: This API element is subject to removal in a future version.use div instead.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleConverts this measure to a measure with a different unit of the same type, eg minutes to seconds.doubleReturns the value of themagnituderecord component.Subtracts another measure of the same unit type from this one.negate()Deprecated, for removal: This API element is subject to removal in a future version.use unaryMinus() instead.static ForceofBaseUnits(double baseUnitMagnitude, ForceUnit unit) For doing math with measures of a known dimension but an unknown unit.static ForceofRelativeUnits(double magnitude, ForceUnit unit) For doing math with measures of a known dimension but an unknown unit.per(AccelerationUnit<?> divisorUnit) Divides this measure by an acceleration unit and returns the result in the most appropriate unit.Divides this measure by an angle unit and returns the result in the most appropriate unit.per(AngularAccelerationUnit divisorUnit) Divides this measure by an angular acceleration unit and returns the result in the most appropriate unit.per(AngularMomentumUnit divisorUnit) Divides this measure by an angular momentum unit and returns the result in the most appropriate unit.per(AngularVelocityUnit divisorUnit) Divides this measure by an angular velocity unit and returns the result in the most appropriate unit.per(CurrentUnit divisorUnit) Divides this measure by a unit of electric current and returns the result in the most appropriate unit.per(DistanceUnit divisorUnit) Divides this measure by a distance unit and returns the result in the most appropriate unit.per(EnergyUnit divisorUnit) Divides this measure by an energy unit and returns the result in the most appropriate unit.Divides this measure by a force unit and returns the result in the most appropriate unit.per(FrequencyUnit divisorUnit) Divides this measure by a frequency unit and returns the result in the most appropriate unit.per(LinearAccelerationUnit divisorUnit) Divides this measure by a linear acceleration unit and returns the result in the most appropriate unit.per(LinearMomentumUnit divisorUnit) Divides this measure by a linear momentum unit and returns the result in the most appropriate unit.per(LinearVelocityUnit divisorUnit) Divides this measure by a linear velocity unit and returns the result in the most appropriate unit.Divides this measure by a mass unit and returns the result in the most appropriate unit.per(MomentOfInertiaUnit divisorUnit) Divides this measure by a moment of inertia unit and returns the result in the most appropriate unit.Divides this measure by a generic compound unit and returns the result in the most appropriate unit.Divides this measure by a generic ratio unit and returns the result in the most appropriate unit.Divides this measure by a power unit and returns the result in the most appropriate unit.per(ResistanceUnit divisorUnit) Divides this measure by a resistance unit and returns the result in the most appropriate unit.per(TemperatureUnit divisorUnit) Divides this measure by a temperature unit and returns the result in the most appropriate unit.Divides this measure by a time period and returns the result in the most appropriate unit.per(TorqueUnit divisorUnit) Divides this measure by a torque unit and returns the result in the most appropriate unit.Per<ForceUnit, VelocityUnit<?>> per(VelocityUnit<?> divisorUnit) Divides this measure by a velocity unit and returns the result in the most appropriate unit.per(VoltageUnit divisorUnit) Divides this measure by a voltage unit and returns the result in the most appropriate unit.Adds another measure of the same unit type to this one.times(double multiplier) Multiplies this measure by a scalar unitless multiplier.times(Acceleration<?> multiplier) Multiplies this measure by an acceleration and returns the resulting measure in the most appropriate unit.Multiplies this measure by an angle and returns the resulting measure in the most appropriate unit.times(AngularAcceleration multiplier) Multiplies this measure by an angular acceleration and returns the resulting measure in the most appropriate unit.times(AngularMomentum multiplier) Multiplies this measure by an angular momentum and returns the resulting measure in the most appropriate unit.times(AngularVelocity multiplier) Multiplies this measure by an angular velocity and returns the resulting measure in the most appropriate unit.Multiplies this measure by an electric current and returns the resulting measure in the most appropriate unit.times(Dimensionless multiplier) Multiplies this measure by a scalar dimensionless multiplier.Multiplies this measure by a distance and returns the resulting measure in the most appropriate unit.Multiplies this measure by an energy and returns the resulting measure in the most appropriate unit.Multiplies this measure by a force and returns the resulting measure in the most appropriate unit.Multiplies this measure by a frequency and returns the resulting measure in the most appropriate unit.times(LinearAcceleration multiplier) Multiplies this measure by a linear acceleration and returns the resulting measure in the most appropriate unit.times(LinearMomentum multiplier) Multiplies this measure by a linear momentum and returns the resulting measure in the most appropriate unit.times(LinearVelocity multiplier) Multiplies this measure by a linear velocity and returns the resulting measure in the most appropriate unit.Multiplies this measure by a mass and returns the resulting measure in the most appropriate unit.times(MomentOfInertia multiplier) Multiplies this measure by a moment of intertia and returns the resulting measure in the most appropriate unit.Multiplies this measure by a generic multiplied measure and returns the resulting measure in the most appropriate unit.Multiplies this measure by a generic ratio measurement and returns the resulting measure in the most appropriate unit.Multiplies this measure by a power and returns the resulting measure in the most appropriate unit.times(Resistance multiplier) Multiplies this measure by a resistance and returns the resulting measure in the most appropriate unit.times(Temperature multiplier) Multiplies this measure by a temperature and returns the resulting measure in the most appropriate unit.Multiplies this measure by a time and returns the resulting measure in the most appropriate unit.Multiplies this measure by a torque and returns the resulting measure in the most appropriate unit.Multiplies this measure by a generic velocity and returns the resulting measure in the most appropriate unit.Multiplies this measure by a voltage and returns the resulting measure in the most appropriate unit.final StringtoString()Returns a string representation of this record class.Returns a measure equivalent to this one equal to zero minus its current value.unit()Returns the value of theunitrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.wpi.first.units.Measure
abs, compareTo, copySign, div, divide, divideRatio, gt, gte, isEquivalent, isNear, isNear, lt, lte, times, timesConversionFactor, timesInverse, timesRatio, toLongString, toShortString
-
Constructor Details
-
Force
Creates an instance of aForcerecord class.- Parameters:
magnitude- the value for themagnituderecord componentbaseUnitMagnitude- the value for thebaseUnitMagnituderecord componentunit- the value for theunitrecord component
-
-
Method Details
-
ofRelativeUnits
For doing math with measures of a known dimension but an unknown unit. Most users should useForceUnit.of(double)on a known unit fromUnitsinstead of calling this method.- Parameters:
magnitude- the magnitude of the measurement in terms of the given unitunit- the unit of the measurement- Returns:
- a measurement object
-
ofBaseUnits
For doing math with measures of a known dimension but an unknown unit. Most users should useForceUnit.of(double)on a known unit fromUnitsinstead of calling this method.- Parameters:
baseUnitMagnitude- the magnitude of the measurement in terms of the given unit's base unitunit- the unit of the measurement- Returns:
- a measurement object
-
baseUnit
Description copied from interface:MeasureA convenience method to get the base unit of the measurement. Equivalent tounit().getBaseUnit(). -
in
Description copied from interface:MeasureConverts this measure to a measure with a different unit of the same type, eg minutes to seconds. Converting to the same unit is equivalent to callingMeasure.magnitude().Meters.of(12).in(Feet) // 39.3701 Seconds.of(15).in(Minutes) // 0.25
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
unaryMinus
Description copied from interface:MeasureReturns a measure equivalent to this one equal to zero minus its current value. For non-linear unit types like temperature, the zero point is treated as the zero value of the base unit (eg Kelvin). In effect, this means code likeCelsius.of(10).unaryMinus()returns a value equivalent to -10 Kelvin, and not -10° Celsius.- Specified by:
unaryMinusin interfaceMeasure<ForceUnit>- Returns:
- a measure equal to zero minus this measure
-
negate
Deprecated, for removal: This API element is subject to removal in a future version.use unaryMinus() instead. This was renamed for consistency with other WPILib classes like Rotation2dReturns a measure equivalent to this one equal to zero minus its current value. For non-linear unit types like temperature, the zero point is treated as the zero value of the base unit (eg Kelvin). In effect, this means code likeCelsius.of(10).negate()returns a value equivalent to -10 Kelvin, and not -10° Celsius. -
plus
Description copied from interface:MeasureAdds another measure of the same unit type to this one. -
minus
Description copied from interface:MeasureSubtracts another measure of the same unit type from this one. -
times
Description copied from interface:MeasureMultiplies this measure by a scalar unitless multiplier. -
div
Description copied from interface:MeasureDivides this measure by a unitless scalar and returns the result. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a unitless scalar and returns the result. -
times
Description copied from interface:MeasureMultiplies this measure by an acceleration and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a generic acceleration and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,AccelerationUnit<?>> divide(Acceleration<?> divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a generic acceleration and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an acceleration unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an angle and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an angle and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an angle and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an angle unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an angular acceleration and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an angular acceleration and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,AngularAccelerationUnit> divide(AngularAcceleration divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an angular acceleration and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an angular acceleration unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an angular momentum and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an angular momentum and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,AngularMomentumUnit> divide(AngularMomentum divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an angular momentum and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an angular momentum unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an angular velocity and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an angular velocity and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,AngularVelocityUnit> divide(AngularVelocity divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an angular velocity and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an angular velocity unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an electric current and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an electric current and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,CurrentUnit> divide(Current divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an electric current and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a unit of electric current and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
div
Description copied from interface:MeasureDivides this measure by a dimensionless scalar and returns the result. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a dimensionless scalar and returns the result. -
times
Description copied from interface:MeasureMultiplies this measure by a scalar dimensionless multiplier. -
times
Description copied from interface:MeasureMultiplies this measure by a distance and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a distance and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,DistanceUnit> divide(Distance divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a distance and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a distance unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by an energy and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by an energy and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by an energy and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by an energy unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a force and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a force and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a force and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a force unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a frequency and returns the resulting measure in the most appropriate unit. This often - but not always - means implementations return a variation of aPermeasure. -
div
Description copied from interface:MeasureDivides this measure by a frequency and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,FrequencyUnit> divide(Frequency divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a frequency and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a frequency unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a linear acceleration and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a linear acceleration and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a linear acceleration and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a linear acceleration unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a linear momentum and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a linear momentum and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,LinearMomentumUnit> divide(LinearMomentum divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a linear momentum and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a linear momentum unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a linear velocity and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a linear velocity and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,LinearVelocityUnit> divide(LinearVelocity divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a linear velocity and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a linear velocity unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a mass and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a mass and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a mass and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a mass unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a moment of intertia and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a moment of inertia and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,MomentOfInertiaUnit> divide(MomentOfInertia divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a moment of inertia and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a moment of inertia unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a generic multiplied measure and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a generic multiplication and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,MultUnit<?, divide?>> (Mult<?, ?> divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a generic multiplication and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a generic compound unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a generic ratio measurement and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a generic ratio and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,PerUnit<?, divide?>> (Per<?, ?> divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a generic ratio and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a generic ratio unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a power and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a power and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a power and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a power unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a resistance and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a resistance and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,ResistanceUnit> divide(Resistance divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a resistance and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a resistance unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a temperature and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a temperature and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,TemperatureUnit> divide(Temperature divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a temperature and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a temperature unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a time and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a time and returns the result in the most appropriate unit. This will often - but not always - result in aPertype likeLinearVelocityorAcceleration. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a time and returns the result in the most appropriate unit. This will often - but not always - result in aPertype likeLinearVelocityorAcceleration. -
per
Description copied from interface:MeasureDivides this measure by a time period and returns the result in the most appropriate unit. This is equivalent todiv(period.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a torque and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a torque and returns the result in the most appropriate unit. -
divide
Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a torque and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a torque unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a generic velocity and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a generic velocity and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,VelocityUnit<?>> divide(Velocity<?> divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a generic velocity and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a velocity unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
times
Description copied from interface:MeasureMultiplies this measure by a voltage and returns the resulting measure in the most appropriate unit. -
div
Description copied from interface:MeasureDivides this measure by a voltage and returns the result in the most appropriate unit. -
divide
@Deprecated(since="2025", forRemoval=true) public Per<ForceUnit,VoltageUnit> divide(Voltage divisor) Deprecated, for removal: This API element is subject to removal in a future version.use div instead. This was renamed for consistency with other languages like KotlinDivides this measure by a voltage and returns the result in the most appropriate unit. -
per
Description copied from interface:MeasureDivides this measure by a voltage unit and returns the result in the most appropriate unit. This is equivalent todiv(divisorUnit.of(1)). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
magnitude
Returns the value of themagnituderecord component. -
baseUnitMagnitude
Returns the value of thebaseUnitMagnituderecord component.- Specified by:
baseUnitMagnitudein interfaceMeasure<ForceUnit>- Returns:
- the value of the
baseUnitMagnituderecord component
-
unit
Returns the value of theunitrecord component.
-