Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.value
Class GMonthValue

    java.lang.Object
      net.sf.saxon.value.Value
          net.sf.saxon.value.AtomicValue
              net.sf.saxon.value.CalendarValue
                  net.sf.saxon.value.GDateValue
                      net.sf.saxon.value.GMonthValue

All Implemented Interfaces:
  Serializable, Comparable, SequenceIterable, Item, ValueRepresentation

    public class GMonthValue

extends GDateValue

Implementation of the xs:gMonth data type

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.value.CalendarValue
`NO_TIMEZONE`

Fields inherited from class net.sf.saxon.value.Value
`EMPTY_CLASS_ARRAY, INDETERMINATE_ORDERING`

Fields inherited from interface net.sf.saxon.om.ValueRepresentation
`EMPTY_VALUE_ARRAY`

Constructor Summary
`GMonthValue(byte month, int tz)`
`GMonthValue(byte month, int tz, AtomicType type)`
`GMonthValue(CharSequence value)`

Method Summary
`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
`AtomicValue` | `convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)` Convert to target data type
`AtomicValue` | `copy(AtomicType typeLabel)` Make a copy of this date, time, or dateTime value
`BuiltInAtomicType` | `getPrimitiveType()` Determine the primitive type of the value.
`CharSequence` | `getStringValueCS()` Get the value of the item as a CharSequence.

Methods inherited from class net.sf.saxon.value.GDateValue
`compareTo, compareTo, convertToJava, equals, getCalendar, getComparisonKey, getDay, getMonth, getYear, hashCode, isLeapYear, isValidDate, setLexicalValue, toDateTime`

Methods inherited from class net.sf.saxon.value.CalendarValue
`adjustTimezone, appendTimezone, appendTimezone, getStringValue, getTimezoneInMinutes, hasTimezone, removeTimezone, setTimezoneInMinutes, subtract`

Methods inherited from class net.sf.saxon.value.AtomicValue
`checkPermittedContents, convert, convert, effectiveBooleanValue, getCardinality, getComponent, getItemType, getLength, getTypedValue, getTypeLabel, getXPathComparable, hasBuiltInType, isMultiValued, itemAt, iterate, process, setTypeLabel, toString`

Methods inherited from class net.sf.saxon.value.Value
`asItem, asItem, asIterator, asValue, convert, convertJavaObjectToXPath, fromItem, getCanonicalLexicalRepresentation, getIterator, getSchemaComparable, iterate, makeQNameValue, reduce, stringToNumber`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### GMonthValue

    public GMonthValue(CharSequence value)
                throws XPathException

Throws:
  `XPathException`

### GMonthValue

    public GMonthValue(byte month,
                       int tz)

### GMonthValue

    public GMonthValue(byte month,
                       int tz,
                       AtomicType type)

Method Detail

### copy

    public AtomicValue copy(AtomicType typeLabel)

  Make a copy of this date, time, or dateTime value

  Specified by:
    `copy` in class `AtomicValue`
  Parameters:
    `typeLabel` -

### getPrimitiveType

    public BuiltInAtomicType getPrimitiveType()

  Determine the primitive type of the value. This delivers the same answer as getItemType().getPrimitiveItemType(). The primitive types are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is AnyAtomicType.

  Specified by:
    `getPrimitiveType` in class `AtomicValue`

### convertPrimitive

    public AtomicValue convertPrimitive(BuiltInAtomicType requiredType,
                                        boolean validate,
                                        XPathContext context)

  Convert to target data type

  Specified by:
    `convertPrimitive` in class `AtomicValue`
  Parameters:
    `requiredType` - an integer identifying the required atomic type
    `context` -
    `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.
  Returns:
    an AtomicValue, a value of the required type; or an ErrorValue

### getStringValueCS

    public CharSequence getStringValueCS()

  Description copied from class: `AtomicValue`
  Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.

  Specified by:
    `getStringValueCS` in interface `Item`
  Specified by:
    `getStringValueCS` in interface `ValueRepresentation`
  Overrides:
    `getStringValueCS` in class `AtomicValue`
  Returns:
    the string value of the item
  See Also:
    `Item.getStringValue()`

### add

    public CalendarValue add(DurationValue duration)
                      throws XPathException

  Add a duration to this date/time value

  Specified by:
    `add` in class `CalendarValue`
  Parameters:
    `duration` - the duration to be added (which might be negative)
  Returns:
    a new date/time value representing the result of adding the duration. The original object is not modified.
  Throws:
    `XPathException`

### adjustTimezone

    public CalendarValue adjustTimezone(int tz)

  Return a new date, time, or dateTime with the same normalized value, but in a different timezone

  Specified by:
    `adjustTimezone` in class `CalendarValue`
  Parameters:
    `tz` - the new timezone, in minutes
  Returns:
    the date/time in the new timezone

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Michael H. Kay. All rights reserved.