org.drools.semantics.java
Class JavaCondition

java.lang.Object
  extended byorg.drools.semantics.java.JavaCondition
All Implemented Interfaces:
Condition, SemanticComponent, java.io.Serializable

public class JavaCondition
extends java.lang.Object
implements java.io.Serializable, Condition

Java expression semantics Condition.

See Also:
Serialized Form
 

Nested Class Summary
static interface JavaCondition.Script
           
 
Constructor Summary
protected JavaCondition(Rule rule, int id, java.lang.String expression)
          Construct.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 Declaration[] getRequiredTupleMembers()
          Retrieve the Declaration s required for evaluating the expression.
 int hashCode()
           
 boolean isAllowed(Tuple tuple)
          Determine if the supplied Tuple is allowed by this condition.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaCondition

protected JavaCondition(Rule rule,
                        int id,
                        java.lang.String expression)
                 throws java.lang.Exception
Construct.

Throws:
javax.naming.ConfigurationException - If an error occurs while attempting to perform configuration.
java.lang.Exception
Parameters:
expression - 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
Throws:
ConditionException - if an error occurs during filtering.
Parameters:
tuple - The Tuple to test.
Returns:
true if the Tuple passes this condition, else false.

getRequiredTupleMembers

public Declaration[] getRequiredTupleMembers()
Retrieve the Declaration s required for evaluating the expression.

Specified by:
getRequiredTupleMembers in interface Condition
Returns:
The required declarations.

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object object)

toString

public java.lang.String toString()