Duration.negated

Returns a copy of this duration with the length negated. !(p) This method swaps the sign of the total length of this duration. For example, {@code PT1.3S} will be returned as {@code PT-1.3S}. !(p) This instance is immutable and unaffected by this method call.

@return a {@code Duration} based on this duration with the amount negated, not null @throws ArithmeticException if numeric overflow occurs

class Duration
negated
()

Meta