Package net.sf.saxon.functions.hof
Class FoldLeftFn.FoldLeftFold
- java.lang.Object
-
- net.sf.saxon.functions.hof.FoldLeftFn.FoldLeftFold
-
- All Implemented Interfaces:
Fold
- Enclosing class:
- FoldLeftFn
public static class FoldLeftFn.FoldLeftFold extends java.lang.Object implements Fold
-
-
Constructor Summary
Constructors Constructor Description FoldLeftFold(XPathContext context, GroundedValue zero, FunctionItem function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isFinished()
Ask whether the computation has completed.void
processItem(Item item)
Process one item in the input sequence, returning a new copy of the working dataSequence
result()
Compute the final result of the function, when all the input has been processed
-
-
-
Constructor Detail
-
FoldLeftFold
public FoldLeftFold(XPathContext context, GroundedValue zero, FunctionItem function)
-
-
Method Detail
-
processItem
public void processItem(Item item) throws XPathException
Description copied from interface:Fold
Process one item in the input sequence, returning a new copy of the working data- Specified by:
processItem
in interfaceFold
- Parameters:
item
- the item to be processed from the input sequence- Throws:
XPathException
- if a dynamic error occurs
-
isFinished
public boolean isFinished()
Description copied from interface:Fold
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:
isFinished
in interfaceFold
- Returns:
- true if the result of the function is now available even though not all items in the sequence have been processed
-
-