org.drools.semantics.groovy
Class ExprCondition

java.lang.Object
  extended byorg.drools.semantics.groovy.Interp
      extended byorg.drools.semantics.groovy.Eval
          extended byorg.drools.semantics.groovy.ExprCondition
All Implemented Interfaces:
Condition, SemanticComponent, Serializable

public class ExprCondition
extends Eval
implements Condition

Groovy expression semantics Condition.

Author:
bob mcwhirter , James Strachan
See Also:
Serialized Form

Constructor Summary
ExprCondition(String expr, Rule rule)
          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
evaluate, evaluate, getRequiredTupleMembers
 
Methods inherited from class org.drools.semantics.groovy.Interp
getCode, getRule, 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(String expr,
                     Rule rule)
              throws Exception
Construct.

Parameters:
expr - The expression.
rule - The rule.
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.


Copyright © 2001-2004 The Codehaus. All Rights Reserved.