org.drools.semantics.groovy
Class ExprCondition

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

public class ExprCondition
extends Eval
implements Condition

Groovy expression semantics Condition.

Version:
$Id: ExprCondition.java,v 1.1 2003/12/09 19:54:06 jstrachan Exp $
Author:
bob mcwhirter, James Strachan
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.groovy.Eval
analyze, evaluate, evaluate, evaluate, getRequiredTupleMembers
 
Methods inherited from class org.drools.semantics.groovy.Interp
getCode, getNode, getText, setUpDictionary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.
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.