Package org.eclipse.wst.xml.xpath2.processor.internal.types
public class XSYearMonthDuration extends org.eclipse.wst.xml.xpath2.processor.internal.types.XSDurationA representation of the YearMonthDuration datatype
Constructor Summary |
XSYearMonthDuration(int year
,
int month
,
boolean negative) |
XSYearMonthDuration(int months) |
XSYearMonthDuration() |
Method Summary | |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Creates a new ResultSequence consisting of the extractable time duration from the supplied ResultSequence |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | div(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical division between this duration stored and the supplied duration of time (of type XSYearMonthDuration) |
public boolean | eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext) Equality comparison between this and the supplied duration of time. |
public java.lang.String | getStringValue() Retrieves a String representation of the duration of time stored |
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition | getTypeDefinition() |
public boolean | gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context) Comparison between this and the supplied duration of time. |
public boolean | lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context) Comparison between this and the supplied duration of time. |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical subtraction between this duration stored and the supplied duration of time (of type XSYearMonthDuration) |
public int | monthValue() Retrieves the duration of time stored as the number of months within it |
public boolean | negative() Retrieves whether this duration represents a backward passage through time |
public static org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration | parseYMDuration(java.lang.String str) Creates a new XSYearMonthDuration by parsing the supplied String represented duration of time |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical addition between this duration stored and the supplied duration of time (of type XSYearMonthDuration) |
public java.lang.String | string_type() Retrieves the datatype's full pathname |
public org.eclipse.wst.xml.xpath2.api.ResultSequence | times(org.eclipse.wst.xml.xpath2.api.ResultSequence arg) Mathematical multiplication between this duration stored and the supplied duration of time (of type XSYearMonthDuration) |
public java.lang.String | type_name() Retrives the datatype's name |
Constructor Detail |
public XSYearMonthDuration(int year
,
int month
,
boolean negative)
Initialises using the supplied parameters. If the number of months supplied is more than 12, the number of years is adjusted accordingly.
public XSYearMonthDuration(int months)
Initialises to the given number of months
public XSYearMonthDuration()
Initialises to a duration of no time (0years and 0months)
Methods Detail |
public org.eclipse.wst.xml.xpath2.api.ResultSequence constructor(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Creates a new ResultSequence consisting of the extractable time duration from the supplied ResultSequence
arg
- The ResultSequence from which to extract
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New ResultSequence consisting of the time duration extracted
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence div(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical division between this duration stored and the supplied duration of time (of type XSYearMonthDuration)
arg
- The duration of time to divide by
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New XSYearMonthDuration representing the resulting duration after the division
org.eclipse.wst.xml.xpath2.processor.DynamicError
public boolean eq(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext)
Equality comparison between this and the supplied duration of time.
arg
- The duration of time to compare with
dynamicContext
boolean
- True if they both represent the duration of time. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String getStringValue()
Retrieves a String representation of the duration of time stored
java.lang.String
- String representation of the duration of time stored
public org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition getTypeDefinition()
org.eclipse.wst.xml.xpath2.api.typesystem.TypeDefinition
public boolean gt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison between this and the supplied duration of time.
arg
- The duration of time to compare with
context
boolean
- True if the supplied time represents a smaller duration than that stored. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public boolean lt(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType arg
,
org.eclipse.wst.xml.xpath2.api.DynamicContext context)
Comparison between this and the supplied duration of time.
arg
- The duration of time to compare with
context
boolean
- True if the supplied time represents a larger duration than that stored. False otherwise
org.eclipse.wst.xml.xpath2.processor.DynamicError
public org.eclipse.wst.xml.xpath2.api.ResultSequence minus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical subtraction between this duration stored and the supplied duration of time (of type XSYearMonthDuration)
arg
- The duration of time to subtract
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New XSYearMonthDuration representing the resulting duration after the subtraction
org.eclipse.wst.xml.xpath2.processor.DynamicError
public int monthValue()
Retrieves the duration of time stored as the number of months within it
int
- Number of months making up this duration of time
public boolean negative()
Retrieves whether this duration represents a backward passage through time
boolean
- True if this duration represents a backward passage through time. False otherwise
public org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration parseYMDuration(java.lang.String str)
Creates a new XSYearMonthDuration by parsing the supplied String represented duration of time
str
- String represented duration of time
org.eclipse.wst.xml.xpath2.processor.internal.types.XSDuration
- New XSYearMonthDuration representing the duration of time supplied
public org.eclipse.wst.xml.xpath2.api.ResultSequence plus(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical addition between this duration stored and the supplied duration of time (of type XSYearMonthDuration)
arg
- The duration of time to add
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New XSYearMonthDuration representing the resulting duration after the addition
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String string_type()
Retrieves the datatype's full pathname
java.lang.String
- "xs:yearMonthDuration" which is the datatype's full pathname
public org.eclipse.wst.xml.xpath2.api.ResultSequence times(org.eclipse.wst.xml.xpath2.api.ResultSequence arg)
Mathematical multiplication between this duration stored and the supplied duration of time (of type XSYearMonthDuration)
arg
- The duration of time to multiply by
org.eclipse.wst.xml.xpath2.api.ResultSequence
- New XSYearMonthDuration representing the resulting duration after the multiplication
org.eclipse.wst.xml.xpath2.processor.DynamicError
public java.lang.String type_name()
Retrives the datatype's name
java.lang.String
- "yearMonthDuration" which is the datatype's name