diff --git a/wpiunits/src/main/java/edu/wpi/first/units/Angle.java b/wpiunits/src/main/java/edu/wpi/first/units/Angle.java index 105a935575..8fd20bb606 100644 --- a/wpiunits/src/main/java/edu/wpi/first/units/Angle.java +++ b/wpiunits/src/main/java/edu/wpi/first/units/Angle.java @@ -4,6 +4,15 @@ package edu.wpi.first.units; +/** + * Unit of angular dimension. + * + *
This is the base type for units of angular dimension. It is also used to specify the dimension
+ * for {@link Measure}: Measure<Angle>.
+ *
+ *
Actual units (such as {@link Units#Degrees} and {@link Units#Radians}) can be found in the
+ * {@link Units} class.
+ */
// technically, angles are unitless dimensions
// eg Mass * Distance * Velocity This is the base type for units of current dimension. It is also used to specify the dimension
+ * for {@link Measure}: Actual units (such as {@link Units#Amps} and {@link Units#Milliamps}) can be found in the
+ * {@link Units} class.
+ */
public class Current extends Unit This is the base type for units of distance dimension. It is also used to specify the
+ * dimension for {@link Measure}: Actual units (such as {@link Units#Meters} and {@link Units#Inches}) can be found in the
+ * {@link Units} class.
+ */
public class Distance extends Unit This is the base type for units of energy dimension. It is also used to specify the dimension
+ * for {@link Measure}: Actual units (such as {@link Units#Joules} and {@link Units#Kilojoules}) can be found in the
+ * {@link Units} class.
+ */
public class Energy extends Unit This is the base type for units of mass dimension. It is also used to specify the dimension
+ * for {@link Measure}: Actual units (such as {@link Units#Grams} and {@link Units#Pounds}) can be found in the {@link
+ * Units} class.
+ */
public class Mass extends Unit The advantage of using this class is that only one instance of a measurement object will exist
- * at a time, as opposed to instantiating a new immutable instance every time a value is fetched.
- * This can greatly reduce memory pressure, but comes at the cost of increased code complexity and
- * sensitivity to race conditions if used poorly.
+ * The advantage of using this class is to reuse one instance of a measurement object, as opposed
+ * to instantiating a new immutable instance every time an operation is performed. This will reduce
+ * memory pressure, but comes at the cost of increased code complexity and sensitivity to race
+ * conditions if misused.
*
* Any unsafe methods are prefixed with {@code mut_*}, such as {@link #mut_plus(Measure)} or
* {@link #mut_replace(Measure)}. These methods will change the internal state of the measurement
diff --git a/wpiunits/src/main/java/edu/wpi/first/units/Per.java b/wpiunits/src/main/java/edu/wpi/first/units/Per.java
index 3d8099ffe0..e22b7d6caa 100644
--- a/wpiunits/src/main/java/edu/wpi/first/units/Per.java
+++ b/wpiunits/src/main/java/edu/wpi/first/units/Per.java
@@ -11,9 +11,7 @@ import java.util.Objects;
* Generic combinatory unit type that represents the proportion of one unit to another, such as
* Meters per Second or Radians per Celsius.
*
- * Note that due to restrictions with the Java type system, velocities (change per unit time) are
- * represented by the {@link Velocity} class. Accelerations are represented by {@code
- * Velocity Note: {@link Velocity} is used to represent the velocity dimension.
*
* @param This is the base type for units of power dimension. It is also used to specify the dimension
+ * for {@link Measure}: Actual units (such as {@link Units#Watts} and {@link Units#Horsepower}) can be found in the
+ * {@link Units} class.
+ */
public class Power extends Unit This is the base type for units of temperature dimension. It is also used to specify the
+ * dimension for {@link Measure}: Actual units (such as {@link Units#Celsius} and {@link Units#Fahrenheit}) can be found in the
+ * {@link Units} class.
+ */
public class Temperature extends Unit This is the base type for units of time dimension. It is also used to specify the dimension
+ * for {@link Measure}: Actual units (such as {@link Units#Seconds} and {@link Units#Milliseconds}) can be found in
+ * the {@link Units} class.
+ */
public class Time extends UnitMeasure<Current>.
+ *
+ * Measure<Distance>.
+ *
+ * Measure<Energy>.
+ *
+ * Measure<Mass>.
+ *
+ *
- * Mult<Force, Distance, Torque>
+ * A combinatory unit type that is equivalent to the product of two other others.
*
* @param the type of the first unit in the result
* @param the type of the second unit in the result
diff --git a/wpiunits/src/main/java/edu/wpi/first/units/MutableMeasure.java b/wpiunits/src/main/java/edu/wpi/first/units/MutableMeasure.java
index ad035f7390..25ca5ab7e3 100644
--- a/wpiunits/src/main/java/edu/wpi/first/units/MutableMeasure.java
+++ b/wpiunits/src/main/java/edu/wpi/first/units/MutableMeasure.java
@@ -8,13 +8,13 @@ import java.util.Objects;
/**
* A specialization of {@link Measure} that allows for mutability. This is intended to be used for
- * memory use reasons (such as on the memory-restricted RoboRIO 1 or 2 or SBC coprocessors) and
+ * memory use reasons (such as on the memory-restricted roboRIO 1 or 2 or SBC coprocessors) and
* should NOT be exposed in the public API for a class that uses it.
*
- * Measure<Power>.
+ *
+ * Measure<Temperature>.
+ *
+ * Measure<Time>.
+ *
+ *