|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.DurationValue
net.sf.saxon.value.SecondsDurationValue
public final class SecondsDurationValue
A value of type xsd:dayTimeDuration
| Field Summary |
|---|
| Fields inherited from class net.sf.saxon.value.DurationValue |
|---|
days, hours, milliseconds, minutes, months, negative, seconds, years |
| Constructor Summary | |
|---|---|
SecondsDurationValue(CharSequence s)
Constructor: create a duration value from a supplied string, in ISO 8601 format [+|-]PnDTnHnMnS |
|
| Method Summary | |
|---|---|
DurationValue |
add(DurationValue other)
Add two dayTime-durations |
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
static SecondsDurationValue |
fromSeconds(double seconds)
Construct a duration value as a number of seconds. |
ItemType |
getItemType()
Determine the data type of the exprssion |
double |
getLengthInSeconds()
Get length of duration in seconds, assuming an average length of month |
String |
getStringValue()
Convert to string |
DurationValue |
multiply(double n)
Multiply duration by a number |
void |
normalize()
Normalize the value, for example 90M becomes 1H30M |
DurationValue |
subtract(DurationValue other)
Subtract two dayTime-durations |
| Methods inherited from class net.sf.saxon.value.DurationValue |
|---|
badDuration, compareTo, convert, equals, getComponent, hashCode |
| Methods inherited from class net.sf.saxon.value.AtomicValue |
|---|
convert, convert, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getPrimitiveValue, getTypedValue, iterate |
| Methods inherited from class net.sf.saxon.value.Value |
|---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecondsDurationValue(CharSequence s)
throws XPathException
XPathException| Method Detail |
|---|
public String getStringValue()
getStringValue in interface ItemgetStringValue in class DurationValue
public void normalize()
throws XPathException.Dynamic
XPathException.Dynamicpublic double getLengthInSeconds()
getLengthInSeconds in class DurationValue
public static SecondsDurationValue fromSeconds(double seconds)
throws XPathException
XPathException
public DurationValue multiply(double n)
throws XPathException
multiply in class DurationValueXPathException
public DurationValue add(DurationValue other)
throws XPathException
add in class DurationValueXPathException
public DurationValue subtract(DurationValue other)
throws XPathException
subtract in class DurationValueXPathExceptionpublic ItemType getItemType()
getItemType in interface ExpressiongetItemType in class DurationValuepublic int conversionPreference(Class required)
conversionPreference in class DurationValue
public Object convertToJava(Class target)
throws XPathException
convertToJava in class DurationValuetarget - The class required by the external function
XPathException
public void display(int level,
NamePool pool)
display in interface Expressiondisplay in class DurationValuelevel - indentation level for this expression
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||