public class NumberFn extends SystemFunction implements ItemMappingFunction
operation
argument
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor and Description |
---|
NumberFn() |
Modifier and Type | Method and Description |
---|---|
static DoubleValue |
convert(AtomicValue value)
Static method to perform the same conversion as the number() function.
|
Item |
evaluateItem(XPathContext context)
Evaluate in a general context
|
Item |
map(Item item)
Mapping function for use when converting a sequence of atomic values to doubles
using the rules of the number() function
|
Expression |
simplify(StaticContext env)
Simplify and validate.
|
addContextDocumentArgument, checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, main, makeSystemFunction, setDetails, useContextItemAsDefault
checkArgumentCount, getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, optimize, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplifyArguments, typeCheck
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeError
public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class FunctionCall
env
- the static contextXPathException
- if an error is discovered during expression
rewritingpublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic static DoubleValue convert(AtomicValue value)
public Item map(Item item) throws XPathException
map
in interface ItemMappingFunction
item
- The input item to be mapped.XPathException