org.apache.xpath.operations

## Class Or

- java.lang.Object
- - org.apache.xpath.Expression
  - - org.apache.xpath.operations.Operation
    - - org.apache.xpath.operations.Or

- All Implemented Interfaces:
    java.io.Serializable, SourceLocator, ExpressionNode, ExpressionOwner, XPathVisitable

      public class Or
      extends Operation

  The 'or' operation expression executer.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Or()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `bool(XPathContext xctxt)` Evaluate this operation directly to a boolean.
    `XObject` | `execute(XPathContext xctxt)` OR two expressions and return the boolean result.

    - ### Methods inherited from class org.apache.xpath.operations.Operation

      `callVisitors, canTraverseOutsideSubtree, deepEquals, fixupVariables, getExpression, getLeftOperand, getRightOperand, operate, setExpression, setLeftRight`

    - ### Methods inherited from class org.apache.xpath.Expression

      `asIterator, asIteratorRaw, asNode, assertion, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isStableNumber, num, warn, xstr`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Or

          public Or()

  - ### Method Detail

    - #### execute

          public XObject execute(XPathContext xctxt)
                          throws TransformerException

      OR two expressions and return the boolean result. Override superclass method for optimization purposes.
      Overrides:
        `execute` in class `Operation`
      Parameters:
        `xctxt` - The runtime execution context.
      Returns:
        `XBoolean.S_TRUE` or `XBoolean.S_FALSE`.
      Throws:
        `TransformerException`

    - #### bool

          public boolean bool(XPathContext xctxt)
                       throws TransformerException

      Evaluate this operation directly to a boolean.
      Overrides:
        `bool` in class `Expression`
      Parameters:
        `xctxt` - The runtime execution context.
      Returns:
        The result of the operation as a boolean.
      Throws:
        `TransformerException`

Copyright © 2014 Apache XML Project. All Rights Reserved.