MCPcopy Create free account
hub / github.com/MenoData/Time4J / abs

Method abs

base/src/main/java/net/time4j/Duration.java:1599–1607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1597 * @see #inverse()
1598 */
1599 public Duration<U> abs() {
1600
1601 if (this.isNegative()) {
1602 return this.inverse();
1603 } else {
1604 return this;
1605 }
1606
1607 }
1608
1609 /**
1610 * <p>Gets a copy of this duration with reversed sign. </p>

Callers 11

printRelativeMethod · 0.45
printRelativeSecondsMethod · 0.45
getCategoryMethod · 0.45
formatMethod · 0.45
writeDateMethod · 0.45
normalizeMethod · 0.45
getPartialAmountMethod · 0.45
multipliedByMethod · 0.45
translateMethod · 0.45
translateMethod · 0.45

Calls 2

isNegativeMethod · 0.95
inverseMethod · 0.95

Tested by

no test coverage detected