Class FoldLeftFn

All Implemented Interfaces:
Callable, FunctionItem, GroundedValue, Item, Sequence

public class FoldLeftFn extends FoldingFunction
This class implements the function fn:fold-left(), which is a standard function in XPath 3.0
  • Constructor Details

    • FoldLeftFn

      public FoldLeftFn()
  • Method Details

    • getFold

      public Fold getFold(XPathContext context, Sequence... arguments) throws XPathException
      Description copied from class: FoldingFunction
      Create the Fold object which actually performs the evaluation. Must be implemented in every subclass.
      Specified by:
      getFold in class FoldingFunction
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of all arguments other than the first.
      Returns:
      the Fold object used to compute the function
      Throws:
      XPathException - if a dynamic error occurs
    • getResultItemType

      public ItemType getResultItemType(Expression[] args)
      Get the return type, given knowledge of the actual arguments
      Overrides:
      getResultItemType in class SystemFunction
      Parameters:
      args - the actual arguments supplied
      Returns:
      the best available item type that the function will return