Package net.sf.saxon.functions
Class Sum.SumFold
- java.lang.Object
-
- net.sf.saxon.functions.Sum.SumFold
-
-
Constructor Summary
Constructors Constructor Description SumFold(XPathContext context, AtomicValue zeroValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFinished()Ask whether the computation has completed.voidprocessItem(Item item)Process one item in the input sequence, returning a new copy of the working dataSequenceresult()Compute the final result of the function, when all the input has been processed
-
-
-
Constructor Detail
-
SumFold
public SumFold(XPathContext context, AtomicValue zeroValue)
-
-
Method Detail
-
processItem
public void processItem(Item item) throws XPathException
Process one item in the input sequence, returning a new copy of the working data- Specified by:
processItemin interfaceFold- Parameters:
item- the item to be processed from the input sequence- Throws:
XPathException- if a dynamic error occurs
-
isFinished
public boolean isFinished()
Ask whether the computation has completed. A function that can deliver its final result without reading the whole input should return true; this will be followed by a call on result() to deliver the final result.- Specified by:
isFinishedin interfaceFold- Returns:
- true if the result of the function is now available even though not all items in the sequence have been processed
-
-