org.drools.spi
Interface Condition

All Superinterfaces:
SemanticComponent, Serializable
All Known Implementing Classes:
GroovyCondition, JavaCondition, PojoCondition, PythonCondition

public interface Condition
extends SemanticComponent

A Condition that filters facts.

Author:
bob mcwhirter
See Also:
Tuple

Method Summary
 Declaration[] getRequiredTupleMembers()
          Retrieve the array of Declaration s required by this condition to perform its duties.
 boolean isAllowed(Tuple tuple)
          Determine if the supplied Tuple is allowed by this condition.
 

Method Detail

getRequiredTupleMembers

Declaration[] getRequiredTupleMembers()
Retrieve the array of Declaration s required by this condition to perform its duties.

Returns:
The array of Declarations expected on incoming Tuples.

isAllowed

boolean isAllowed(Tuple tuple)
                  throws ConditionException
Determine if the supplied Tuple is allowed by this 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-2005 The Codehaus. All Rights Reserved.