com.jscape.util.workflow

## Class BinaryExpression

- java.lang.Object
- - com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object>
  - - com.jscape.util.workflow.BinaryExpression

- All Implemented Interfaces:
    java.io.Serializable

      public class BinaryExpression
      extends com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object>

  Represents binary expression. Each binary expression consists from left and right expressions combined with binary operator.
  Author:
    Alex
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.jscape.util.functor.UnaryFunction

      `com.jscape.util.functor.UnaryFunction.Chain<T,R,U>, com.jscape.util.functor.UnaryFunction.Constant<T,U>, com.jscape.util.functor.UnaryFunction.Evaluator<V,R>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinaryExpression()` Creates a new expression instance.
    `BinaryExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> leftExpression, com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object> operator, com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> rightExpression)` Creates a new expression instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `evaluate(ExpressionContext context)` Computes expression value.
    `com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object>` | `getLeftExpression()` Returns left expression.
    `com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object>` | `getOperator()` Returns operator.
    `com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object>` | `getRightExpression()` Returns right expression.
    `void` | `setLeftExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)` Sets left expression.
    `void` | `setOperator(com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object> value)` Sets operator.
    `void` | `setRightExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)` Sets right expression.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.jscape.util.functor.UnaryFunction

      `constant, then`

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

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

- - ### Constructor Detail

    - #### BinaryExpression

          public BinaryExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> leftExpression,
                                  com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object> operator,
                                  com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> rightExpression)

      Creates a new expression instance.
      Parameters:
        `leftExpression` - the left expression
        `operator` - the operator
        `rightExpression` - the right expresion

    - #### BinaryExpression

          public BinaryExpression()

      Creates a new expression instance.

  - ### Method Detail

    - #### getLeftExpression

          public com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> getLeftExpression()

      Returns left expression.
      Returns:
        left expression

    - #### setLeftExpression

          public void setLeftExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)

      Sets left expression.
      Parameters:
        `value` - the left expression

    - #### getRightExpression

          public com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> getRightExpression()

      Returns right expression.
      Returns:
        right expression

    - #### setRightExpression

          public void setRightExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)

      Sets right expression.
      Parameters:
        `value` - the right expression

    - #### getOperator

          public com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object> getOperator()

      Returns operator.
      Returns:
        operator

    - #### setOperator

          public void setOperator(com.jscape.util.functor.BinaryFunction<java.lang.Object,java.lang.Object,java.lang.Object> value)

      Sets operator.
      Parameters:
        `value` - the operator

    - #### evaluate

          public java.lang.Object evaluate(ExpressionContext context)

      Computes expression value.
      Specified by:
        `evaluate` in class `com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object>`
      Parameters:
        `context` - the workflow context
      Returns:
        computed value

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2019. All Rights Reserved