public class Sum extends FoldingFunction
Constructor and Description |
---|
Sum() |
Modifier and Type | Method and Description |
---|---|
int |
getCardinality(Expression[] arguments)
Get the cardinality, given knowledge of the actual arguments
|
java.lang.String |
getCompilerName()
Get the (local) name of a class that can be used to generate bytecode for this
system function
|
Fold |
getFold(XPathContext context,
Sequence... additionalArguments)
Create the Fold object which actually performs the evaluation.
|
ItemType |
getResultItemType(Expression[] args)
Get the return type, given knowledge of the actual arguments
|
static AtomicValue |
total(SequenceIterator in,
XPathContext context,
Location locator)
Static method to compute a total, invoked from compiled bytecode
|
call, getStreamerName
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
getLength, head, isStreamed, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public ItemType getResultItemType(Expression[] args)
SystemFunction
getResultItemType
in class SystemFunction
args
- the actual arguments suppliedpublic int getCardinality(Expression[] arguments)
SystemFunction
getCardinality
in class SystemFunction
arguments
- the actual arguments suppliedpublic Fold getFold(XPathContext context, Sequence... additionalArguments) throws XPathException
getFold
in class FoldingFunction
context
- the dynamic evaluation contextadditionalArguments
- the values of all arguments other than the first.XPathException
- if a dynamic error occurspublic static AtomicValue total(SequenceIterator in, XPathContext context, Location locator) throws XPathException
in
- the sequence of items to be summedcontext
- dynamic context for evaluationlocator
- expression location for diagnosticsXPathException
- if a dynamic error occurspublic java.lang.String getCompilerName()
SystemFunction
getCompilerName
in class SystemFunction
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.