Skip to content

Commit 2b38832

Browse files
committed
1 parent 885af0a commit 2b38832

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

src/main/java/javax/measure/Unit.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
* @author <a href="mailto:steve@unidata.ucar.edu">Steve Emmerson</a>
6868
* @author <a href="mailto:martin.desruisseaux@geomatys.com">Martin Desruisseaux</a>
6969
* @author <a href="mailto:werner@units.tech">Werner Keil</a>
70-
* @version 2.0, April 24, 2019
70+
* @version 2.1, May 12, 2019
7171
* @since 1.0
7272
*
7373
* @see <a href="http://en.wikipedia.org/wiki/Units_of_measurement">Wikipedia: Units of measurement</a>
@@ -136,7 +136,7 @@ public interface Unit<Q extends Quantity<Q>> {
136136

137137
/**
138138
* Indicates if this unit is compatible with the unit specified. Units don't need to be equals to be compatible. For example (assuming {@code ONE}
139-
* is a dimensionless unit):
139+
* is a dimensionless unit):<br>
140140
*
141141
* <code>
142142
* RADIAN.equals(ONE) == false<br>
@@ -153,7 +153,7 @@ public interface Unit<Q extends Quantity<Q>> {
153153

154154
/**
155155
* Casts this unit to a parameterized unit of specified nature or throw a {@code ClassCastException} if the dimension of the specified quantity and
156-
* this unit's dimension do not match. For example:
156+
* this unit's dimension do not match. For example:<br>
157157
*
158158
* <code>
159159
* {@literal Unit<Speed>} C = METRE.multiply(299792458).divide(SECOND).asType(Speed.class);
@@ -234,7 +234,7 @@ public interface Unit<Q extends Quantity<Q>> {
234234

235235
/**
236236
* Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
237-
* convertible with this unit. For example the following code:
237+
* convertible with this unit. For example the following code:<br>
238238
*
239239
* <code>
240240
* CELSIUS = KELVIN.shift(273.15);
@@ -252,7 +252,7 @@ public interface Unit<Q extends Quantity<Q>> {
252252

253253
/**
254254
* Returns the result of setting the origin of the scale of measurement to the given value. The returned unit is convertible with all units that are
255-
* convertible with this unit. For example the following code:
255+
* convertible with this unit. For example the following code:<br>
256256
*
257257
* <code>
258258
* CELSIUS = KELVIN.shift(273.15);
@@ -269,10 +269,10 @@ public interface Unit<Q extends Quantity<Q>> {
269269

270270
/**
271271
* Returns the result of multiplying this unit by the specified factor. If the factor is an integer value, the multiplication is exact
272-
* (recommended). For example:
272+
* (recommended). For example:<br>
273273
*
274274
* <code>
275-
* FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
275+
* FOOT = METRE.multiply(3048).divide(10000); // Exact definition.<br>
276276
* ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
277277
* </code>
278278
*
@@ -284,10 +284,10 @@ public interface Unit<Q extends Quantity<Q>> {
284284
Unit<Q> multiply(Number multiplier);
285285

286286
/**
287-
* Returns the result of multiplying this unit by the specified factor. For example:
287+
* Returns the result of multiplying this unit by the specified factor. For example:<br>
288288
*
289289
* <code>
290-
* FOOT = METRE.multiply(3048).divide(10000); // Exact definition.
290+
* FOOT = METRE.multiply(3048).divide(10000); // Exact definition.<br>
291291
* ELECTRON_MASS = KILOGRAM.multiply(9.10938188e-31); // Approximation.
292292
* </code>
293293
*
@@ -315,7 +315,7 @@ public interface Unit<Q extends Quantity<Q>> {
315315
Unit<?> inverse();
316316

317317
/**
318-
* Returns the result of dividing this unit by a divisor. If the factor is an integer value, the division is exact. For example:
318+
* Returns the result of dividing this unit by a divisor. If the factor is an integer value, the division is exact. For example:<br>
319319
*
320320
* <code>
321321
* GRAM = KILOGRAM.divide(1000); // Exact definition.
@@ -329,7 +329,7 @@ public interface Unit<Q extends Quantity<Q>> {
329329
Unit<Q> divide(Number divisor);
330330

331331
/**
332-
* Returns the result of dividing this unit by an approximate divisor. For example:
332+
* Returns the result of dividing this unit by an approximate divisor. For example:<br>
333333
*
334334
* <code>
335335
* GRAM = KILOGRAM.divide(1000d);

src/main/java/javax/measure/UnitConverter.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* Desruisseaux</a>
4545
* @author <a href="mailto:thodoris.bais@gmail.com">Thodoris Bais</a>
4646
* @author <a href="mailto:ahuber@apache.org">Andi Huber</a>
47-
* @version 1.3, March 11, 2019
47+
* @version 1.4, May 12, 2019
4848
* @since 1.0
4949
*
5050
* @see Unit
@@ -68,32 +68,28 @@ public interface UnitConverter {
6868
* vector space (a scalar) to a one-dimensional vector space. Typically from 'R' to 'R', with 'R' the
6969
* real numbers.
7070
*
71-
* <p>
7271
* Given such a 'linear' converter 'A', let 'u', 'v' and 'r' be arbitrary numbers, then the following
7372
* must hold by definition:
7473
*
7574
* <ul>
7675
* <li>{@code A(u + v) == A(u) + A(v)}</li>
7776
* <li>{@code A(r * u) == r * A(u)}</li>
7877
* </ul>
79-
* </p>
8078
*
81-
* <p>
8279
* Given a second 'linear' converter 'B', commutativity of composition follows by above definition:
8380
*
8481
* <ul>
8582
* <li>{@code (A o B) (u) == (B o A) (u)}</li>
8683
* </ul>
8784
*
8885
* In other words, two 'linear' converters do have the property that {@code A(B(u)) == B(A(u))}, meaning
89-
* for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:
90-
* </p>
91-
* <p>
92-
*{@code A.concatenate(B).convert(u) == B.concatenate(A).convert(u)}
93-
* </p>
94-
* <p>
86+
* for 'A' and 'B' the order of their composition does not matter. Expressed as Java code:<br>
87+
* <br>
88+
*
89+
*{@code A.concatenate(B).convert(u) == B.concatenate(A).convert(u)}<br>
90+
* <br>
91+
*
9592
* Note: For composing UnitConverters see also {@link UnitConverter#concatenate(UnitConverter)}.
96-
* </p>
9793
*
9894
* @return {@code true} if this converter represents a linear transformation;
9995
* {@code false} otherwise.

0 commit comments

Comments
 (0)