Uses of Class
javax.xml.datatype.Duration
-
Uses of Duration in javax.xml.datatype
Modifier and TypeMethodDescriptionabstract Duration
Computes a new duration whose value isthis+rhs
.Duration.multiply
(int factor) Computes a new duration whose value isfactor
times longer than the value of this duration.abstract Duration
Duration.multiply
(BigDecimal factor) Computes a new duration whose value isfactor
times longer than the value of this duration.abstract Duration
Duration.negate()
Returns a newDuration
object whose value is-this
.DatatypeFactory.newDuration
(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) Obtain a new instance of aDuration
specifying theDuration
as isPositive, years, months, days, hours, minutes, seconds.abstract Duration
DatatypeFactory.newDuration
(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds) Obtain a new instance of aDuration
specifying theDuration
as isPositive, years, months, days, hours, minutes, seconds.abstract Duration
DatatypeFactory.newDuration
(long durationInMilliSeconds) Obtain a new instance of aDuration
specifying theDuration
as milliseconds.abstract Duration
DatatypeFactory.newDuration
(String lexicalRepresentation) Obtain a new instance of aDuration
specifying theDuration
as its string representation, "PnYnMnDTnHnMnS", as defined in XML Schema 1.0 section 3.2.6.1.DatatypeFactory.newDurationDayTime
(boolean isPositive, int day, int hour, int minute, int second) Create aDuration
of typexdt:dayTimeDuration
using the specifiedday
,hour
,minute
andsecond
as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DatatypeFactory.newDurationDayTime
(boolean isPositive, BigInteger day, BigInteger hour, BigInteger minute, BigInteger second) Create aDuration
of typexdt:dayTimeDuration
using the specifiedday
,hour
,minute
andsecond
as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DatatypeFactory.newDurationDayTime
(long durationInMilliseconds) Create aDuration
of typexdt:dayTimeDuration
using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DatatypeFactory.newDurationDayTime
(String lexicalRepresentation) Create aDuration
of typexdt:dayTimeDuration
by parsing itsString
representation, "PnDTnHnMnS", XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.DatatypeFactory.newDurationYearMonth
(boolean isPositive, int year, int month) Create aDuration
of typexdt:yearMonthDuration
using the specifiedyear
andmonth
as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DatatypeFactory.newDurationYearMonth
(boolean isPositive, BigInteger year, BigInteger month) Create aDuration
of typexdt:yearMonthDuration
using the specifiedyear
andmonth
as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DatatypeFactory.newDurationYearMonth
(long durationInMilliseconds) Create aDuration
of typexdt:yearMonthDuration
using the specified milliseconds as defined in XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.DatatypeFactory.newDurationYearMonth
(String lexicalRepresentation) Create aDuration
of typexdt:yearMonthDuration
by parsing itsString
representation, "PnYnM", XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.abstract Duration
Duration.normalizeWith
(Calendar startTimeInstant) Converts the years and months fields into the days field by using a specific time instant as the reference point.Computes a new duration whose value isthis-rhs
.Modifier and TypeMethodDescriptionabstract Duration
Computes a new duration whose value isthis+rhs
.abstract void
Addduration
to this instance.abstract int
Partial order relation comparison with thisDuration
instance.boolean
Duration.isLongerThan
(Duration duration) Checks if this duration object is strictly longer than anotherDuration
object.boolean
Duration.isShorterThan
(Duration duration) Checks if this duration object is strictly shorter than anotherDuration
object.Computes a new duration whose value isthis-rhs
.