BaseDuration (Groovy 5.1.0)

Package: groovy.time

## [Java] Class BaseDuration

- groovy.time.BaseDuration

- All Implemented Interfaces and Traits:
    Comparable

      public abstract class BaseDuration
      extends Object
      implements Comparable

  Base class for date and time durations.

  See Also:
    Duration

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `BaseDuration.From` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected int` | `days` |
    `protected int` | `hours` |
    `protected int` | `millis` |
    `protected int` | `minutes` |
    `protected int` | `months` |
    `protected int` | `seconds` |
    `protected int` | `years` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `protected BaseDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis)`
    `protected BaseDuration(int days, int hours, int minutes, int seconds, int millis)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public int` | `compareTo(BaseDuration otherDuration)`
    `` | `public abstract Date` | `getAgo()`
    `` | `public int` | `getDays()`
    `` | `public abstract BaseDuration.From` | `getFrom()`
    `` | `public int` | `getHours()`
    `` | `public int` | `getMillis()`
    `` | `public int` | `getMinutes()`
    `` | `public int` | `getMonths()`
    `` | `public int` | `getSeconds()`
    `` | `public int` | `getYears()`
    `` | `public Date` | `plus(Date date)`
    `` | `public abstract long` | `toMilliseconds()`
    `` | `public String` | `toString()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected final int days

    - #### protected final int hours

    - #### protected final int millis

    - #### protected final int minutes

    - #### protected final int months

    - #### protected final int seconds

    - #### protected final int years

  - ### Constructor Detail

    - #### protected BaseDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis)

    - #### protected BaseDuration(int days, int hours, int minutes, int seconds, int millis)

  - ### Method Detail

    - #### @Override
      public int compareTo(BaseDuration otherDuration)

    - #### public abstract Date getAgo()

    - #### public int getDays()

    - #### public abstract BaseDuration.From getFrom()

    - #### public int getHours()

    - #### public int getMillis()

    - #### public int getMinutes()

    - #### public int getMonths()

    - #### public int getSeconds()

    - #### public int getYears()

    - #### public Date plus(Date date)

    - #### public abstract long toMilliseconds()

    - #### @Override
      public String toString()