Interface CmpPos

  • All Known Implementing Classes:
    IntPos

    public interface CmpPos
    Position checks.
    Author:
    BaseX Team 2005-22, BSD License, Christian Gruen
    • Method Detail

      • test

        int test​(long pos,
                 QueryContext qc)
          throws QueryException
        Checks the current position.
        • Returns 2 if the test is successful and remaining tests can be skipped
        • Returns 1 if the test is successful
        • Returns 0 otherwise
        Parameters:
        pos - current position
        qc - query context
        Returns:
        result of check
        Throws:
        QueryException - query exception
      • exact

        boolean exact()
        Checks if the minimum and maximum positions are identical.
        Returns:
        result of check
      • invert

        Expr invert​(CompileContext cc)
             throws QueryException
        If possible, returns an optimized expression with inverted operands.
        Parameters:
        cc - compilation context
        Returns:
        inverted expression or null
        Throws:
        QueryException - query exception