Package org.apache.groovy.dateutil

# Class Duration

java.lang.Object
org.apache.groovy.dateutil.BaseDuration
org.apache.groovy.dateutil.Duration

All Implemented Interfaces:
  `Comparable<BaseDuration>`

Direct Known Subclasses:
  `TimeDuration`

public class Duration extends BaseDuration
A context-independent duration: days and below, whose length is known without a datum.

DEQUIRKED: `toMilliseconds()`, `getAgo()` and `getFrom()` are now inherited from `BaseDuration` (uniform, deterministic, time-preserving); only the type-preserving arithmetic remains here.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.groovy.dateutil.BaseDuration

  `BaseDuration.From`

- ## Field Summary

  ### Fields inherited from class org.apache.groovy.dateutil.BaseDuration

  `days, hours, millis, minutes, months, seconds, years`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Duration(int days, int hours, int minutes, int seconds, int millis)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DatumDependentDuration`
  `minus(DatumDependentDuration rhs)`
  `Duration`
  `minus(Duration rhs)`
  `TimeDatumDependentDuration`
  `minus(TimeDatumDependentDuration rhs)`
  `TimeDuration`
  `minus(TimeDuration rhs)`
  `DatumDependentDuration`
  `plus(DatumDependentDuration rhs)`
  `Duration`
  `plus(Duration rhs)`
  `Duration`
  `plus(TimeDuration rhs)`

  ### Methods inherited from class org.apache.groovy.dateutil.BaseDuration

  `compareTo, getAgo, getDays, getFrom, getHours, getMillis, getMinutes, getMonths, getSeconds, getYears, plus, toMilliseconds, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Duration

    public Duration(int days, int hours, int minutes, int seconds, int millis)

- ## Method Details

  - ### plus

    public Duration plus(Duration rhs)

  - ### plus

    public Duration plus(TimeDuration rhs)

  - ### plus

    public DatumDependentDuration plus(DatumDependentDuration rhs)

  - ### minus

    public Duration minus(Duration rhs)

  - ### minus

    public TimeDuration minus(TimeDuration rhs)

  - ### minus

    public DatumDependentDuration minus(DatumDependentDuration rhs)

  - ### minus

    public TimeDatumDependentDuration minus(TimeDatumDependentDuration rhs)