public class GYearValue extends GDateValue
day, daysPerMonth, month, monthData, xsd10rules, yearNO_TIMEZONEtypeLabelINDETERMINATE_ORDERINGEMPTY_VALUE_ARRAY| Constructor and Description |
|---|
GYearValue(int year,
int tz,
AtomicType type) |
GYearValue(int year,
int tz,
boolean xsd10) |
| Modifier and Type | Method and Description |
|---|---|
CalendarValue |
add(DurationValue duration)
Add a duration to this date/time value
|
CalendarValue |
adjustTimezone(int tz)
Return a new date, time, or dateTime with the same normalized value, but
in a different timezone
|
ConversionResult |
convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
ConversionRules rules)
Convert to target data type
|
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Make a copy of this date, time, or dateTime value
|
CharSequence |
getPrimitiveStringValue()
Convert the value to a string, using the serialization rules for the primitive type.
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
static ConversionResult |
makeGYearValue(CharSequence value,
ConversionRules rules) |
compareTo, equals, getCalendar, getComparisonKey, getComponent, getDay, getMonth, getSchemaComparable, getYear, hashCode, isLeapYear, isValidDate, setLexicalValue, toDateTimeadjustTimezone, appendString, appendTimezone, appendTimezone, appendTwoDigits, getTimezoneInMinutes, getXPathComparable, hasTimezone, isIdentical, makeCalendarValue, removeTimezone, setTimezoneInMinutes, subtractasAtomic, checkPermittedContents, convert, convert, convert, effectiveBooleanValue, getCardinality, getItemType, getLength, getStringValue, getStringValueCS, getTypedValue, getTypeLabel, isNaN, itemAt, iterate, process, setTypeLabel, subsequence, toStringasItem, asItem, asIterator, asValue, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, iterate, reducepublic GYearValue(int year,
int tz,
boolean xsd10)
public GYearValue(int year,
int tz,
AtomicType type)
public static ConversionResult makeGYearValue(CharSequence value, ConversionRules rules)
public AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType in class AtomicValuetypeLabel - public BuiltInAtomicType getPrimitiveType()
getPrimitiveType in class AtomicValuepublic ConversionResult convertPrimitive(BuiltInAtomicType requiredType, boolean validate, ConversionRules rules)
convertPrimitive in class AtomicValuerequiredType - an integer identifying the required atomic typerules - validate - true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation
is therefore not required.
Note that a validation failure may be reported even if validation was not requested.public CharSequence getPrimitiveStringValue()
AtomicValuegetPrimitiveStringValue in class AtomicValuepublic CalendarValue add(DurationValue duration) throws XPathException
add in class CalendarValueduration - the duration to be added (which might be negative)XPathExceptionpublic CalendarValue adjustTimezone(int tz)
adjustTimezone in class CalendarValuetz - the new timezone, in minutes