com.acsinet_solutions.util.expr
Class SimpleExpression

java.lang.Object
  extended by com.acsinet_solutions.util.expr.AbstractExpression
      extended by com.acsinet_solutions.util.expr.SimpleExpression
All Implemented Interfaces:
Expression

public class SimpleExpression
extends AbstractExpression
implements Expression

Implementation of a generic simple expression. Unary, binary and n-ary expressions are combined with an expression type.

Author:
Santiago Arriaga

Constructor Summary
SimpleExpression(java.lang.Object expression1, java.lang.String type, java.lang.Object expression2)
          Create a simple binary expression
SimpleExpression(java.lang.String type, java.lang.Object expression)
          Create a simple unary expression
 
Method Summary
 java.util.List<java.lang.Object> getExpressions()
          Return a copy of the expressions that are operated by this condition.
 
Methods inherited from class com.acsinet_solutions.util.expr.AbstractExpression
getExpression, getType, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.acsinet_solutions.util.expr.Expression
getExpression, getType, size
 

Constructor Detail

SimpleExpression

public SimpleExpression(java.lang.Object expression1,
                        java.lang.String type,
                        java.lang.Object expression2)
Create a simple binary expression

Parameters:
expression1 - A not-null Object expression
type - The not-null condition type string as defined in ConditionTypes
expression2 - A not-null Object expression

SimpleExpression

public SimpleExpression(java.lang.String type,
                        java.lang.Object expression)
Create a simple unary expression

Parameters:
type - The not-null condition type string as defined in ConditionTypes
expression - A not-null Object expression
Method Detail

getExpressions

public final java.util.List<java.lang.Object> getExpressions()
Description copied from interface: Expression
Return a copy of the expressions that are operated by this condition.

Specified by:
getExpressions in interface Expression
Returns:
A not-null maybe-empty immutable List of java.lang.Object instances.