Class FnSubsequence

Direct Known Subclasses:
UtilRange

public class FnSubsequence extends StandardFunc
Function implementation.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • FnSubsequence

      public FnSubsequence()
  • Method Details

    • iter

      public Iter iter(QueryContext qc) throws QueryException
      Description copied from class: Expr
      Evaluates the expression and returns an iterator on the resulting items. The implementation of this method is optional.
      Overrides:
      iter in class ParseExpr
      Parameters:
      qc - query context
      Returns:
      iterator
      Throws:
      QueryException - query exception
    • value

      public Value value(QueryContext qc) throws QueryException
      Description copied from class: Expr
      Evaluates the expression and returns the resulting value. If this method is not implemented, Expr.item(QueryContext, InputInfo) must be implemented instead.
      Overrides:
      value in class ParseExpr
      Parameters:
      qc - query context
      Returns:
      value
      Throws:
      QueryException - query exception
    • start

      public long start(double value)
      Returns the start position.
      Parameters:
      value - double value
      Returns:
      long value
    • end

      public long end(long first, double second)
      Computes the count of items to be returned.
      Parameters:
      first - first argument
      second - second argument
      Returns:
      length
    • opt

      protected final Expr opt(CompileContext cc) throws QueryException
      Description copied from class: StandardFunc
      Performs function specific optimizations.
      Overrides:
      opt in class StandardFunc
      Parameters:
      cc - compilation context
      Returns:
      optimized or original expression
      Throws:
      QueryException - query exception
    • ddo

      public final boolean ddo()
      Description copied from class: Expr
      Indicates if this expression returns nodes in document order without duplicates.
      Overrides:
      ddo in class Expr
      Returns:
      result of check