Class Duration

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

public class Duration extends Object
The Class Duration.
  • 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