public class Count extends FoldingFunction
Constructor and Description |
---|
Count() |
Modifier and Type | Method and Description |
---|---|
IntegerValue |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
static int |
count(SequenceIterator iter)
Get the number of items in a sequence identified by a SequenceIterator
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the Sum expression
|
Fold |
getFold(XPathContext context,
Sequence... additionalArguments)
Create the Fold object which actually performs the evaluation.
|
IntegerValue[] |
getIntegerBounds()
For an expression that returns an integer or a sequence of integers, get
a lower and upper bound on the values of the integers that may be returned, from
static analysis.
|
CountAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
equals, export, exportAttributes, getArity, getCardinality, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, importAttributes, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getStringValue, getStringValueCS, isArray, isMap, optimize, simplify, typeCheck
getLength, head, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public IntegerValue[] getIntegerBounds()
getIntegerBounds
in class SystemFunction
public 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 int count(SequenceIterator iter) throws XPathException
iter
- The SequenceIterator. This method moves the current position
of the supplied iterator; if this isn't safe, make a copy of the iterator
first by calling getAnother(). The supplied iterator must be positioned
before the first item (there must have been no call on next()).XPathException
- if a failure occurs reading the input sequencepublic IntegerValue call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
call
in interface Function
call
in class FoldingFunction
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as SequencesXPathException
- if a dynamic error occurs during the evaluation of the expressionpublic CountAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class FoldingFunction
public ExpressionCompiler getExpressionCompiler()
getExpressionCompiler
in class SystemFunction
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.