org.drools.semantics.java
Class ExprCondition

java.lang.Object
  |
  +--org.drools.semantics.java.Interp
        |
        +--org.drools.semantics.java.Expr
              |
              +--org.drools.semantics.java.ExprCondition
All Implemented Interfaces:
Condition, SemanticComponent, java.io.Serializable

public class ExprCondition
extends Expr
implements Condition

Java expression semantics Condition.

Version:
$Id: ExprCondition.java,v 1.11 2003/11/28 06:43:01 bob Exp $
Author:
bob@werken.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.drools.spi.Condition
EMPTY_ARRAY
 
Constructor Summary
ExprCondition(java.lang.String expr, Declaration[] availDecls)
          Construct.
 
Method Summary
 boolean isAllowed(Tuple tuple)
          Determine if the supplied Tuple is allowed by this condition.
 
Methods inherited from class org.drools.semantics.java.Expr
analyze, getExpression, getRequiredTupleMembers
 
Methods inherited from class org.drools.semantics.java.Interp
evaluate, evaluate, getText, setText, setUpNameSpace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.spi.Condition
getRequiredTupleMembers
 

Constructor Detail

ExprCondition

public ExprCondition(java.lang.String expr,
                     Declaration[] availDecls)
              throws java.lang.Exception
Construct.

Parameters:
expr - The expression.
availDecls - The available declarations.
Throws:
ConfigurationException - If an error occurs while attempting to perform configuration.
java.lang.Exception
Method Detail

isAllowed

public boolean isAllowed(Tuple tuple)
                  throws ConditionException
Determine if the supplied Tuple is allowed by this condition.

Specified by:
isAllowed in interface Condition
Parameters:
tuple - The Tuple to test.
Returns:
true if the Tuple passes this condition, else false.
Throws:
ConditionException - if an error occurs during filtering.