mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
SCRIPT: Spotless Apply
This commit is contained in:
committed by
Peter Johnson
parent
c89910b7c6
commit
c48b722dac
@@ -10,8 +10,8 @@ import org.wpilib.units.measure.Acceleration;
|
||||
* A generic unit of acceleration.
|
||||
*
|
||||
* <p><strong>NOTE:</strong> This type is not compatible with unit-specific accelerations like
|
||||
* {@link org.wpilib.units.measure.LinearAcceleration}. Authors of APIs that need to interact
|
||||
* with all types should consider using a generic {@code Measure<? extends PerUnit<? extends
|
||||
* {@link org.wpilib.units.measure.LinearAcceleration}. Authors of APIs that need to interact with
|
||||
* all types should consider using a generic {@code Measure<? extends PerUnit<? extends
|
||||
* PerUnit<[dimension>], TimeUnit>, TimeUnit>}. Bounded wildcards are necessary in order to
|
||||
* interoperate with <i>any</i> subclass of the {@link org.wpilib.units.measure.Per} measurement
|
||||
* type.
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
package org.wpilib.units;
|
||||
|
||||
import org.wpilib.units.collections.LongToObjectHashMap;
|
||||
import java.util.Objects;
|
||||
import java.util.function.BiFunction;
|
||||
import org.wpilib.units.collections.LongToObjectHashMap;
|
||||
|
||||
/**
|
||||
* A helper class for creating and caching combined unit objects. This helps to reduce unnecessary
|
||||
|
||||
@@ -6,9 +6,7 @@ package org.wpilib.units;
|
||||
|
||||
import org.wpilib.units.measure.LinearAcceleration;
|
||||
|
||||
/**
|
||||
* A unit of linear acceleration like {@link org.wpilib.units.Units#MetersPerSecondPerSecond}.
|
||||
*/
|
||||
/** A unit of linear acceleration like {@link org.wpilib.units.Units#MetersPerSecondPerSecond}. */
|
||||
public final class LinearAccelerationUnit extends PerUnit<LinearVelocityUnit, TimeUnit> {
|
||||
private static final CombinatoryUnitCache<LinearVelocityUnit, TimeUnit, LinearAccelerationUnit>
|
||||
cache = new CombinatoryUnitCache<>(LinearAccelerationUnit::new);
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.units;
|
||||
import org.wpilib.units.measure.MomentOfInertia;
|
||||
|
||||
/**
|
||||
* A unit of moment of inertia, like {@link org.wpilib.units.Units#KilogramSquareMeters}. Moments
|
||||
* of inertia describe how much an object resists being rotated, analogous to mass's resistance to
|
||||
* A unit of moment of inertia, like {@link org.wpilib.units.Units#KilogramSquareMeters}. Moments of
|
||||
* inertia describe how much an object resists being rotated, analogous to mass's resistance to
|
||||
* being accelerated along a line.
|
||||
*/
|
||||
public final class MomentOfInertiaUnit extends PerUnit<AngularMomentumUnit, AngularVelocityUnit> {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
package org.wpilib.units;
|
||||
|
||||
import org.wpilib.units.measure.Mult;
|
||||
import java.util.Objects;
|
||||
import org.wpilib.units.measure.Mult;
|
||||
|
||||
/**
|
||||
* A combinatory unit type that is equivalent to the product of two other others. Note that
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
package org.wpilib.units;
|
||||
|
||||
import org.wpilib.units.measure.Per;
|
||||
import java.util.Objects;
|
||||
import org.wpilib.units.measure.Per;
|
||||
|
||||
/**
|
||||
* Generic combinatory unit type that represents the proportion of one unit to another, such as
|
||||
@@ -157,8 +157,8 @@ public class PerUnit<N extends Unit, D extends Unit> extends Unit {
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>Note: When called on an object of type {@code PerUnit} (and <i>not</i> a subclass!), this
|
||||
* method will always return a {@link org.wpilib.units.measure.Per} instance. If you want to
|
||||
* avoid casting, use {@link #ofNative(double)} that returns a {@code Per} instance directly.
|
||||
* method will always return a {@link org.wpilib.units.measure.Per} instance. If you want to avoid
|
||||
* casting, use {@link #ofNative(double)} that returns a {@code Per} instance directly.
|
||||
*
|
||||
* @param magnitude the magnitude of the measure
|
||||
* @return the ratio measure
|
||||
@@ -172,9 +172,8 @@ public class PerUnit<N extends Unit, D extends Unit> extends Unit {
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>Note: When called on an object of type {@code PerUnit} (and <i>not</i> a subclass!), this
|
||||
* method will always return a {@link org.wpilib.units.measure.Per} instance. If you want to
|
||||
* avoid casting, use {@link #ofNativeBaseUnits(double)} that returns a {@code Per} instance
|
||||
* directly.
|
||||
* method will always return a {@link org.wpilib.units.measure.Per} instance. If you want to avoid
|
||||
* casting, use {@link #ofNativeBaseUnits(double)} that returns a {@code Per} instance directly.
|
||||
*
|
||||
* @param baseUnitMagnitude the magnitude of the measure in terms of its base units.
|
||||
* @return the ratio measure
|
||||
|
||||
Reference in New Issue
Block a user