Skip to content

Commit

Permalink
335: Improve and fix JavaDoc
Browse files Browse the repository at this point in the history
Task-Url: #335
  • Loading branch information
keilw committed May 1, 2021
1 parent 42dd3db commit 2198336
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
7 changes: 2 additions & 5 deletions src/main/java/tech/units/indriya/quantity/NumberQuantity.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* The type of the quantity.
* @author Andi Huber
* @author Werner Keil
* @version 2.1, Feb 16, 2021
* @version 2.2, May 1, 2021
* @since 1.0
*
*/
Expand Down Expand Up @@ -135,7 +135,4 @@ public Quantity<Q> negate() {
public Number getValue() {
return value;
}



}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* @author Otavio Santana
* @author Werner Keil
* @author Andi Huber
* @version 1.1
* @version 1.2
* @since 1.0
*/
public final class TimeUnitQuantity extends AbstractQuantity<Time> {
Expand Down Expand Up @@ -97,21 +97,6 @@ public static TimeUnitQuantity of(Number number, TimeUnit timeUnit) {
return new TimeUnitQuantity(Objects.requireNonNull(timeUnit), Objects.requireNonNull(number));
}

/**
* creates the {@link TimeUnitQuantity} using {@link TimeUnit} and {@link Integer}
*
* @param timeUnit
* - time to be used
* @param value
* - value to be used
* @since 1.0
* @deprecated use #of(Number, TimeUnit)
*/
@Deprecated
public static TimeUnitQuantity of(TimeUnit timeUnit, Integer number) {
return of(number, timeUnit);
}

/**
* Creates a {@link TimeUnitQuantity} based a {@link Quantity<Time>} converted to {@link SI#SECOND}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void timeUnitWiredCorrectlyInFactoryMethodOfWithIntegerValueAndTimeUnit()
@Test @Deprecated @Disabled("TimeUnitQuantity implementation is no longer backed by Long")
public void valueWiredCorrectlyInFactoryMethodOfWithTimeUnitAndIntegerValue() {
final Integer testValue = 42;
TimeUnitQuantity quantity = TimeUnitQuantity.of(TimeUnit.MINUTES, testValue);
TimeUnitQuantity quantity = TimeUnitQuantity.of(testValue, TimeUnit.MINUTES);
assertEquals(Long.valueOf(testValue), quantity.getValue());
}

Expand All @@ -122,7 +122,7 @@ public void valueWiredCorrectlyInFactoryMethodOfWithTimeUnitAndIntegerValue() {
@Test
public void timeUnitWiredCorrectlyInFactoryMethodOfWithTimeUnitAndIntegerValue() {
final TimeUnit testUnit = TimeUnit.MINUTES;
TimeUnitQuantity quantity = TimeUnitQuantity.of(testUnit, 42);
TimeUnitQuantity quantity = TimeUnitQuantity.of(42, testUnit);
assertEquals(testUnit, quantity.getTimeUnit());
}

Expand Down

0 comments on commit 2198336

Please sign in to comment.