Represents an XML Schema-compatible duration.
Both the immutable GDuration and the mutable GDurationBuilder are GDurationSpecifications. Use this interface where you want to allow callers to pass any implementation of a GDuration.
Related Topics
GDurationBuilder
, GDuration
Method Summary |
public int |
|
public int |
|
public |
|
public int |
|
public int |
|
public int |
|
public int |
|
public int |
|
public int |
|
public boolean |
|
public boolean |
|
Method Detail |
public int compareToGDuration(GDurationSpecification
duration)
Comparison to another GDuration.
public int getDay()Gets the day-of-month component.
public BigDecimal
getFraction()
Gets the fraction-of-second. Range from 0 (inclusive) to 1 (exclusive).
public int getHour()Gets the hour-of-day component.
public int getMinute()Gets the minute-of-hour component.
public int getMonth()Gets the month-of-year component.
public int getSecond()Gets the second-of-minute component.
public int getSign()Returns the sign of the duration: +1 is forwards and -1 is backwards in time.
public int getYear()Gets the year component.
public boolean isImmutable()True if this instance is immutable.
public boolean isValid()Returns true if all of the individual components of the duration are nonnegative.