com.jscape.util.workflow
Class BinaryExpression

java.lang.Object
  extended by com.jscape.util.workflow.BinaryExpression
All Implemented Interfaces:
Expression

public final class BinaryExpression
extends java.lang.Object
implements Expression

Represents binary expression. Each binary expression consists from left and right expressions combined with binary operator.

Author:
Alex

Constructor Summary
BinaryExpression()
          Creates a new expression instance.
BinaryExpression(Expression leftExpression, BinaryOperator operator, Expression rightExpression)
          Creates a new expression instance.
 
Method Summary
 java.lang.Object compute(Context context)
          Computes expression value.
 Expression getLeftExpression()
          Returns left expression.
 BinaryOperator getOperator()
          Returns operator.
 Expression getRightExpression()
          Returns right expression.
 void setLeftExpression(Expression value)
          Sets left expression.
 void setOperator(BinaryOperator value)
          Sets operator.
 void setRightExpression(Expression value)
          Sets right expression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryExpression

public BinaryExpression(Expression leftExpression,
                        BinaryOperator operator,
                        Expression 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 Expression getLeftExpression()
Returns left expression.

Returns:
left expression

setLeftExpression

public void setLeftExpression(Expression value)
Sets left expression.

Parameters:
value - the left expression

getRightExpression

public Expression getRightExpression()
Returns right expression.

Returns:
right expression

setRightExpression

public void setRightExpression(Expression value)
Sets right expression.

Parameters:
value - the right expression

getOperator

public BinaryOperator getOperator()
Returns operator.

Returns:
operator

setOperator

public void setOperator(BinaryOperator value)
Sets operator.

Parameters:
value - the operator

compute

public java.lang.Object compute(Context context)
Computes expression value.

Specified by:
compute in interface Expression
Parameters:
context - the workflow context
Returns:
computed value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2007 JSCAPE Corp. All Rights Reserved.