Class Evaluator.LazyTail

  • Enclosing class:
    Evaluator

    public static final class Evaluator.LazyTail
    extends Evaluator
    An evaluator for arguments that in general return a sequence, where the sequence is evaluated lazily on first use. This is appropriate when calling a function which might not use the value, or might not use all of it. It returns a LazySequence, which can only be read once, so this is only suitable for use when calling a function that can be trusted to read the argument once only.
    • Constructor Detail

      • LazyTail

        public LazyTail()
    • Method Detail

      • getCode

        public int getCode()
        Description copied from class: Evaluator
        Get the integer code for the evaluator
        Specified by:
        getCode in class Evaluator
        Returns:
        the integer code for the evaluator
      • evaluate

        public Sequence evaluate​(Expression expr,
                                 XPathContext context)
                          throws XPathException
        Description copied from class: Evaluator
        Evaluate an expression to return a sequence
        Specified by:
        evaluate in class Evaluator
        Parameters:
        expr - the expression to be evaluated
        context - the dynamic context for evaluation
        Returns:
        the result of the evaluation
        Throws:
        XPathException - if any dynamic error occurs during the evaluation