Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]
public interface: GDurationSpecification [javadoc | source]

All Known Implementing Classes:
    GDuration, GDurationBuilder

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.

Method from org.apache.xmlbeans.GDurationSpecification Summary:
compareToGDuration,   getDay,   getFraction,   getHour,   getMinute,   getMonth,   getSecond,   getSign,   getYear,   isImmutable,   isValid
Method from org.apache.xmlbeans.GDurationSpecification Detail:
 public int compareToGDuration(GDurationSpecification duration)
    Comparison to another GDuration.
    • Returns -1 if this < duration. (less-than)
    • Returns 0 if this == duration. (equal)
    • Returns 1 if this > duration. (greater-than)
    • Returns 2 if this <> duration. (incomparable)
    Two instances are incomparable if they have different amounts of information.
 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.