Skip to content

Commit a0e8ee9

Browse files
committed
UNITSOFMEASUREMENT-11: API JavaDoc
Task-Url: https://java.net/jira/browse/UNITSOFMEASUREMENT-11
1 parent 3bcca29 commit a0e8ee9

7 files changed

Lines changed: 20 additions & 25 deletions

File tree

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

Lines changed: 3 additions & 3 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:desruisseaux@users.sourceforge.net">Martin Desruisseaux</a>
6969
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
70-
* @version 0.20, December 30, 2015
70+
* @version 0.21, April 3, 2016
7171
*
7272
* @see <a href="http://en.wikipedia.org/wiki/Units_of_measurement">Wikipedia: Units of measurement</a>
7373
*/
@@ -83,7 +83,7 @@ public interface Unit<Q extends Quantity<Q>> {
8383
* @return this unit symbol, or {@code null} if this unit has not specific symbol associated with (e.g. product of units).
8484
*
8585
* @see #toString()
86-
* @see UnitFormat
86+
* @see javax.measure.format.UnitFormat
8787
*/
8888
String getSymbol();
8989

@@ -93,7 +93,7 @@ public interface Unit<Q extends Quantity<Q>> {
9393
* @return this unit name, or {@code null} if this unit has not specific name associated with (e.g. product of units).
9494
*
9595
* @see #toString()
96-
* @see UnitFormat
96+
* @see javax.measure.format.UnitFormat
9797
*/
9898
String getName();
9999

src/main/java/javax/measure/package-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
* Specifies Java packages for the programmatic, type safe handling
3232
* of quantities and their expression as values of units.
3333
*
34-
* <p>The core interfaces of this package are {@link javax.measure.Measurement}, {@link javax.measure.Quantity} and {@link javax.measure.Unit}.</p>
34+
* <p>The core interfaces of this package are {@link javax.measure.Dimension}, {@link javax.measure.Quantity} and {@link javax.measure.Unit}.</p>
3535
*
3636
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
3737
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
3838
* @author <a href="mailto:llima@v2com.mobi">Leonardo de Moura Rocha Lima</a>
39-
* @version 1.2 ($Revision: 395 $), $Date: 2014-01-27 23:16:02 +0100 (Mo, 27 Jän 2014) $
39+
* @version 1.3 ($Revision: 395 $), $Date: 2016-04-03 $
4040
*
4141
*/
4242
package javax.measure;

src/main/java/javax/measure/quantity/Acceleration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@
3535
* Rate of change of velocity with respect to time. The metric system unit for this quantity is "m/s²" (metre per square second).
3636
*
3737
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
38-
* @version 1.0
38+
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
39+
* @version 1.1
40+
*
41+
* @see <a href="https://en.wikipedia.org/wiki/Acceleration">Wikipedia: Acceleration</a>
3942
*
4043
* @see Length
4144
* @see Speed
4245
* @see Time
43-
* @see AngularAcceleration
4446
*/
4547
public interface Acceleration extends Quantity<Acceleration> {
4648
}

src/main/java/javax/measure/quantity/AmountOfSubstance.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
*
3737
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
3838
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
39-
* @version 1.2
39+
* @version 1.3
4040
*
41-
* @see <a href=" http://en.wikipedia.org/wiki/Amount_of_substance">Wikipedia: Amount of Substance</a>
41+
* @see <a href="http://en.wikipedia.org/wiki/Amount_of_substance">Wikipedia: Amount of Substance</a>
4242
*
4343
* @apiNote SI Base Unit
4444
*/

src/test/java/javax/measure/test/TestUnit.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public Unit<Q> shift(double offset) {
7373
return this;
7474
}
7575

76+
@SuppressWarnings({ "unchecked", "rawtypes" })
7677
public Unit<Q> alternate(String symbol) {
7778
return new BaseUnit(symbol);
7879
}
@@ -136,7 +137,6 @@ public String getName() {
136137
}
137138

138139
public Map<Unit<?>, Integer> getProductUnits() {
139-
// TODO Auto-generated method stub
140140
return null;
141141
}
142142

@@ -145,49 +145,42 @@ public String getSymbol() {
145145
}
146146

147147
public Unit<?> inverse() {
148-
// TODO Auto-generated method stub
149148
return null;
150149
}
151150

152151
public boolean isCompatible(Unit<?> that) {
153-
// TODO Auto-generated method stub
154152
return false;
155153
}
156154

157155
public Unit<Q> multiply(double factor) {
158-
// TODO Auto-generated method stub
159156
return null;
160157
}
161158

162159
public Unit<?> multiply(Unit<?> that) {
163-
// TODO Auto-generated method stub
164160
return null;
165161
}
166162

167163
public Unit<?> pow(int n) {
168-
// TODO Auto-generated method stub
169164
return null;
170165
}
171166

172167
public Unit<?> root(int n) {
173-
// TODO Auto-generated method stub
174168
return null;
175169
}
176170

177171
public abstract Unit<Q> getSystemUnit();
178172

179173
/**
180-
* Returns the converter from this unit to its unscaled {@link #toSysemUnit System Unit} unit.
174+
* Returns the converter from this unit to its unscaled {@link #getSystemUnit System Unit} unit.
181175
*
182176
* @return <code>getConverterTo(this.toSystemUnit())</code>
183-
* @see #toSI
177+
* @see #getSystemUnit
184178
*/
185179
public UnitConverter getSystemConverter() throws UnsupportedOperationException {
186180
return TestConverter.IDENTITY;
187181
}
188182

189183
public Unit<Q> transform(UnitConverter operation) {
190-
// TODO Auto-generated method stub
191184
return null;
192185
}
193186

src/test/java/javax/measure/test/format/TestFormat.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
*
5757
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
5858
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
59-
* @version 0.3
59+
* @version 0.8
6060
*
6161
*/
6262
abstract class TestFormat implements UnitFormat {
@@ -117,11 +117,11 @@ public final Unit<?> parse(CharSequence csq) throws ParserException {
117117
}
118118

119119
/**
120-
* Formats an object to produce a string. This is equivalent to <blockquote> {@link #format(Unit, StringBuilder) format}<code>(unit,
120+
* Formats an object to produce a string. This is equivalent to <blockquote> {@link #format(Unit, Appendable) format}<code>(unit,
121121
* new StringBuilder()).toString();</code> </blockquote>
122122
*
123-
* @param obj
124-
* The object to format
123+
* @param unit
124+
* The unit to format
125125
* @return Formatted string.
126126
* @exception IllegalArgumentException
127127
* if the Format cannot format the given object

src/test/java/javax/measure/test/quantity/TestQuantity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ public String toString() {
107107
}
108108

109109
/**
110-
* Compares this quantity to the specified Measurement quantity. The default implementation compares the {@link AbstractQuantity#doubleValue(Unit)}
111-
* of both this quantity and the specified Quantity stated in the same unit (this quantity's {@link #getUnit() unit}).
110+
* Compares this quantity to the specified Measurement quantity. The default implementation compares the {@link Quantity#getValue()} of both this
111+
* quantity and the specified Quantity stated in the same unit (this quantity's {@link #getUnit() unit}).
112112
*
113113
* @return a negative integer, zero, or a positive integer as this quantity is less than, equal to, or greater than the specified Quantity quantity.
114114
* @return <code>Double.compare(this.doubleValue(getUnit()),

0 commit comments

Comments
 (0)