Example usage for Java javax.xml.datatype Duration fields, constructors, methods, implement or subclass
The text is from its open source code.
Duration | add(final Duration rhs) Computes a new duration whose value is this+rhs . |
void | addTo(Calendar calendar) Adds this duration to a Calendar object. |
void | addTo(Date date) Adds this duration to a Date object. |
int | compare(final Duration duration) Partial order relation comparison with this Duration instance. |
int | getDays() Obtains the value of the DAYS field as an integer value, or 0 if not present. |
Number | getField(final DatatypeConstants.Field field) Gets the value of a field. |
int | getHours() Obtains the value of the HOURS field as an integer value, or 0 if not present. |
int | getMinutes() Obtains the value of the MINUTES field as an integer value, or 0 if not present. |
int | getMonths() Obtains the value of the MONTHS field as an integer value, or 0 if not present. |
int | getSeconds() Obtains the value of the SECONDS field as an integer value, or 0 if not present. |
int | getSign() Returns the sign of this duration in -1,0, or 1. |
long | getTimeInMillis(final Calendar startInstant) Returns the length of the duration in milli-seconds. |
long | getTimeInMillis(final Date startInstant) Returns the length of the duration in milli-seconds. |
QName | getXMLSchemaType() Return the name of the XML Schema date/time type that this instance maps to. |
int | getYears() Get the years value of this Duration as an int or 0 if not present. |
Duration | negate() Returns a new Duration object whose value is -this . |
Duration | subtract(final Duration rhs) Computes a new duration whose value is this-rhs . |
String | toString() Returns a String representation of this Duration Object . |