Package com.independentsoft.graph

# Class Duration

java.lang.Object
com.independentsoft.graph.Duration

public class Duration extends Object
The Class Duration.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Duration()`
  Instantiates a new duration.
  `Duration​(int hours)`
  Instantiates a new duration.
  `Duration​(int hours, int minutes)`
  Instantiates a new duration.
  `Duration​(int hours, int minutes, int seconds)`
  Instantiates a new duration.
  `Duration​(String duration)`
  Instantiates a new duration from a string.

- ## Method Summary

  Modifier and Type
  Method
  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.
  `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.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### Duration

    public Duration()
    Instantiates a new duration.

  - ### Duration

    public Duration​(int hours)
    Instantiates a new duration.
    Parameters:
      `hours` - the hours

  - ### Duration

    public Duration​(int hours, int minutes)
    Instantiates a new duration.
    Parameters:
      `hours` - the hours
      `minutes` - the minutes

  - ### Duration

    public Duration​(int hours, int minutes, int seconds)
    Instantiates a new duration.
    Parameters:
      `hours` - the hours
      `minutes` - the minutes
      `seconds` - the seconds

  - ### Duration

    public Duration​(String duration)
    Instantiates a new duration from a string.
    Parameters:
      `duration` - the duration

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `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