Uses of Class
javax.xml.datatype.Duration
| Package | Description |
|---|---|
| javax.xml.datatype |
Defines XML/Java Type Mappings.
|
-
Uses of Duration in javax.xml.datatype
Methods in javax.xml.datatype that return Duration Modifier and Type Method Description abstract DurationDuration. add(Duration rhs)Computes a new duration whose value isthis+rhs.DurationDuration. multiply(int factor)Computes a new duration whose value isfactortimes longer than the value of this duration.abstract DurationDuration. multiply(BigDecimal factor)Computes a new duration whose value isfactortimes longer than the value of this duration.abstract DurationDuration. negate()Returns a newDurationobject whose value is-this.DurationDatatypeFactory. newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)Obtain a new instance of aDurationspecifying theDurationas isPositive, years, months, days, hours, minutes, seconds.abstract DurationDatatypeFactory. newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds)Obtain a new instance of aDurationspecifying theDurationas isPositive, years, months, days, hours, minutes, seconds.abstract DurationDatatypeFactory. newDuration(long durationInMilliSeconds)Obtain a new instance of aDurationspecifying theDurationas milliseconds.abstract DurationDatatypeFactory. newDuration(String lexicalRepresentation)Obtain a new instance of aDurationspecifying theDurationas its string representation, "PnYnMnDTnHnMnS", as defined in XML Schema 1.0 section 3.2.6.1.DurationDatatypeFactory. newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)Create aDurationof typexdt:dayTimeDurationusing the specifiedday,hour,minuteandsecondas defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DurationDatatypeFactory. newDurationDayTime(boolean isPositive, BigInteger day, BigInteger hour, BigInteger minute, BigInteger second)Create aDurationof typexdt:dayTimeDurationusing the specifiedday,hour,minuteandsecondas defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DurationDatatypeFactory. newDurationDayTime(long durationInMilliseconds)Create aDurationof typexdt:dayTimeDurationusing the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DurationDatatypeFactory. newDurationDayTime(String lexicalRepresentation)Create aDurationof typexdt:dayTimeDurationby parsing itsStringrepresentation, "PnDTnHnMnS", XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DurationDatatypeFactory. newDurationYearMonth(boolean isPositive, int year, int month)Create aDurationof typexdt:yearMonthDurationusing the specifiedyearandmonthas defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DurationDatatypeFactory. newDurationYearMonth(boolean isPositive, BigInteger year, BigInteger month)Create aDurationof typexdt:yearMonthDurationusing the specifiedyearandmonthas defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DurationDatatypeFactory. newDurationYearMonth(long durationInMilliseconds)Create aDurationof typexdt:yearMonthDurationusing the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DurationDatatypeFactory. newDurationYearMonth(String lexicalRepresentation)Create aDurationof typexdt:yearMonthDurationby parsing itsStringrepresentation, "PnYnM", XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.abstract DurationDuration. normalizeWith(Calendar startTimeInstant)Converts the years and months fields into the days field by using a specific time instant as the reference point.DurationDuration. subtract(Duration rhs)Computes a new duration whose value isthis-rhs.Methods in javax.xml.datatype with parameters of type Duration Modifier and Type Method Description abstract DurationDuration. add(Duration rhs)Computes a new duration whose value isthis+rhs.abstract voidXMLGregorianCalendar. add(Duration duration)Adddurationto this instance.abstract intDuration. compare(Duration duration)Partial order relation comparison with thisDurationinstance.booleanDuration. isLongerThan(Duration duration)Checks if this duration object is strictly longer than anotherDurationobject.booleanDuration. isShorterThan(Duration duration)Checks if this duration object is strictly shorter than anotherDurationobject.DurationDuration. subtract(Duration rhs)Computes a new duration whose value isthis-rhs.