Example usage for org.joda.time Duration negated

List of usage examples for org.joda.time Duration negated

Introduction

In this page you can find the example usage for org.joda.time Duration negated.

Prototype

public Duration negated() 

Source Link

Document

Returns a new duration with this length negated.

Usage

From source file:me.vertretungsplan.parser.ParserUtils.java

License:Mozilla Public License

private static Duration abs(Duration duration) {
    Duration nothing = new Duration(0);
    if (duration.isShorterThan(nothing)) {
        return duration.negated();
    } else {/*from www.j a va 2s . c  om*/
        return duration;
    }
}