Defines XML/Java Type Mappings.
Computes a new duration whose value is this+rhs
.
Computes a new duration whose value is factor
times
longer than the value of this duration.
Computes a new duration whose value is factor
times
longer than the value of this duration.
Returns a new Duration
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 a Duration
specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
Obtain a new instance of a Duration
specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
DatatypeFactory. newDuration (long durationInMilliSeconds)
Obtain a new instance of a Duration
specifying the Duration
as milliseconds.
Obtain a new instance of a Duration
specifying the Duration
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)
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 is this-rhs
.
Computes a new duration whose value is this+rhs
.
abstract void
Add duration
to this instance.
abstract int
Partial order relation comparison with this Duration
instance.
boolean
Checks if this duration object is strictly longer than
another Duration
object.
boolean
Checks if this duration object is strictly shorter than
another Duration
object.
Computes a new duration whose value is this-rhs
.
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2024, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .