Represent a subtype xdt:yearMonthDuration of a Duration
as specified in
XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The DurationYearMonth object represents a period of Gregorian time, with a lexical representation, "PnYnM" that contains only year and month components.
XMLGregorianCalendar#add(Duration)
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | DurationYearMonthImpl(boolean
Set to isPositive, BigInteger false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.of this years, BigInteger Durationof this months)DurationConstructs a new Duration object by specifying each field individually. |
| protected | DurationYearMonthImpl(final boolean
Set to isPositive, final int years, final int months)false to create a negative duration. When the length
of the duration is zero, this parameter will be ignored.Construct a |
| protected | DurationYearMonthImpl(long
Milliseconds of durationInMilliseconds)Duration to create.Construct a |
| protected | DurationYearMonthImpl(String
Lexical representation of a duration. lexicalRepresentation)Construct a |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | Returns: the value of yearMonthDurationThe value space of xs:yearMonthDuration is the set of xs:integer month values. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| DurationYearMonthImpl | back to summary |
|---|---|
| public DurationYearMonthImpl(boolean isPositive, BigInteger years, BigInteger months) Constructs a new Duration object by specifying each field individually. All the parameters are optional as long as at least one field is present. If specified, parameters have to be zero or positive.
| |
| DurationYearMonthImpl | back to summary |
|---|---|
| protected DurationYearMonthImpl(final boolean isPositive, final int years, final int months) Construct a A
| |
| DurationYearMonthImpl | back to summary |
|---|---|
| protected DurationYearMonthImpl(long durationInMilliseconds) Construct a The datatype Both values are set by computing their values from the specified milliseconds
and are availabe using the
The default start instance is defined by Any remaining milliseconds after determining the year and month are discarded.
| |
| DurationYearMonthImpl | back to summary |
|---|---|
| protected DurationYearMonthImpl(String lexicalRepresentation) Construct a The datatype Both values are set and availabe from the created The XML Schema specification states that values can be of an arbitrary size.
Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
An
| |
| convertToCanonicalYearMonth | back to summary |
|---|---|
| private void convertToCanonicalYearMonth() | |
| getValue | back to summary |
|---|---|
| public int getValue() The value space of xs:yearMonthDuration is the set of xs:integer month values.
| |