com.independentsoft.exchange

## Class Duration

- java.lang.Object
- - com.independentsoft.exchange.Duration

-     public class Duration
      extends java.lang.Object

  The Class Duration.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Duration()` Instantiates a new duration.
    `Duration(int years)` Instantiates a new duration.
    `Duration(int years, int months)` Instantiates a new duration.
    `Duration(int years, int months, int days)` Instantiates a new duration.
    `Duration(int years, int months, int days, int hours)` Instantiates a new duration.
    `Duration(int years, int months, int days, int hours, int minutes)` Instantiates a new duration.
    `Duration(int years, int months, int days, int hours, int minutes, int seconds)` Instantiates a new duration.
    `Duration(int years, int months, int days, int hours, int minutes, int seconds, int milliseconds)` Instantiates a new duration.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDays()` Gets the days.
    `int` | `getHours()` Gets the hours.
    `int` | `getMilliseconds()` Gets the milliseconds.
    `int` | `getMinutes()` Gets the minutes.
    `int` | `getMonths()` Gets the months.
    `int` | `getSeconds()` Gets the seconds.
    `int` | `getYears()` Gets the years.
    `boolean` | `isNegative()` Checks if is negative.
    `static Duration` | `parse(java.lang.String duration)` Parses the.
    `void` | `setDays(int days)` Sets the days.
    `void` | `setHours(int hours)` Sets the hours.
    `void` | `setMilliseconds(int milliseconds)` Sets the milliseconds.
    `void` | `setMinutes(int minutes)` Sets the minutes.
    `void` | `setMonths(int months)` Sets the months.
    `void` | `setNegative(boolean isNegative)` Sets the negative.
    `void` | `setSeconds(int seconds)` Sets the seconds.
    `void` | `setYears(int years)` Sets the years.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### Duration

          public Duration()

      Instantiates a new duration.

    - #### Duration

          public Duration(int years)

      Instantiates a new duration.
      Parameters:
        `years` - the years

    - #### Duration

          public Duration(int years,
                          int months)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months

    - #### Duration

          public Duration(int years,
                          int months,
                          int days)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months
        `days` - the days

    - #### Duration

          public Duration(int years,
                          int months,
                          int days,
                          int hours)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months
        `days` - the days
        `hours` - the hours

    - #### Duration

          public Duration(int years,
                          int months,
                          int days,
                          int hours,
                          int minutes)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months
        `days` - the days
        `hours` - the hours
        `minutes` - the minutes

    - #### Duration

          public Duration(int years,
                          int months,
                          int days,
                          int hours,
                          int minutes,
                          int seconds)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months
        `days` - the days
        `hours` - the hours
        `minutes` - the minutes
        `seconds` - the seconds

    - #### Duration

          public Duration(int years,
                          int months,
                          int days,
                          int hours,
                          int minutes,
                          int seconds,
                          int milliseconds)

      Instantiates a new duration.
      Parameters:
        `years` - the years
        `months` - the months
        `days` - the days
        `hours` - the hours
        `minutes` - the minutes
        `seconds` - the seconds
        `milliseconds` - the milliseconds

  - ### Method Detail

    - #### parse

          public static Duration parse(java.lang.String duration)

      Parses the.
      Parameters:
        `duration` - the duration
      Returns:
        the duration

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getYears

          public int getYears()

      Gets the years.
      Returns:
        the years

    - #### setYears

          public void setYears(int years)

      Sets the years.
      Parameters:
        `years` - the new years

    - #### getMonths

          public int getMonths()

      Gets the months.
      Returns:
        the months

    - #### setMonths

          public void setMonths(int months)

      Sets the months.
      Parameters:
        `months` - the new months

    - #### getDays

          public int getDays()

      Gets the days.
      Returns:
        the days

    - #### setDays

          public void setDays(int days)

      Sets the days.
      Parameters:
        `days` - the new days

    - #### getHours

          public int getHours()

      Gets the hours.
      Returns:
        the hours

    - #### setHours

          public void setHours(int hours)

      Sets the hours.
      Parameters:
        `hours` - the new hours

    - #### getMinutes

          public int getMinutes()

      Gets the minutes.
      Returns:
        the minutes

    - #### setMinutes

          public void setMinutes(int minutes)

      Sets the minutes.
      Parameters:
        `minutes` - the new minutes

    - #### getSeconds

          public int getSeconds()

      Gets the seconds.
      Returns:
        the seconds

    - #### setSeconds

          public void setSeconds(int seconds)

      Sets the seconds.
      Parameters:
        `seconds` - the new seconds

    - #### getMilliseconds

          public int getMilliseconds()

      Gets the milliseconds.
      Returns:
        the milliseconds

    - #### setMilliseconds

          public void setMilliseconds(int milliseconds)

      Sets the milliseconds.
      Parameters:
        `milliseconds` - the new milliseconds

    - #### isNegative

          public boolean isNegative()

      Checks if is negative.
      Returns:
        true, if is negative

    - #### setNegative

          public void setNegative(boolean isNegative)

      Sets the negative.
      Parameters:
        `isNegative` - the new negative