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

Method abs

base/src/main/java/net/time4j/MachineTime.java:751–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

749 * @since 2.0
750 */
751 public MachineTime<U> abs() {
752
753 if (this.isNegative()) {
754 return new MachineTime<>(Math.negateExact(this.seconds), -this.nanos, this.scale);
755 } else {
756 return this;
757 }
758
759 }
760
761 /**
762 * <p>Creates a copy with inversed sign. </p>

Callers 5

isShorterThanMethod · 0.95
isLongerThanMethod · 0.95
getTotalLengthMethod · 0.45
getPartialAmountMethod · 0.45
createNumberMethod · 0.45

Calls 1

isNegativeMethod · 0.95

Tested by

no test coverage detected