Rule Execution Server API

ilog.rules.engine
Class IlrPropertyFilter

java.lang.Object
  extended by ilog.rules.engine.IlrPropertyFilter
All Implemented Interfaces:
IlrAgendaFilter, Serializable

public class IlrPropertyFilter
extends Object
implements IlrAgendaFilter, Serializable

This class implements an agenda filter. The filter is based on the value of a rule property. Using this filter, the rule instances which have been assigned the specified value will be fired.

Since:
4.0
See Also:
Serialized Form

Constructor Summary
IlrPropertyFilter(String propertyKey, Object propertyValue)
          Creates an IlrPropertyFilter.
 
Method Summary
 boolean toFire(IlrRuleInstance instance)
          This method tests whether a rule instance will be fired based on its specified property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrPropertyFilter

public IlrPropertyFilter(String propertyKey,
                         Object propertyValue)

Creates an IlrPropertyFilter. This object will fire the rule instances whose specified property has the given value.

Parameters:
propertyKey - The property's name.
propertyValue - The property's value.
Method Detail

toFire

public boolean toFire(IlrRuleInstance instance)

This method tests whether a rule instance will be fired based on its specified property value.

The filter tests whether the specified property of the rule has a given value. It uses the equals method to test the equality of the values. A rule instance whose rule has not defined the property will not be fired.

Specified by:
toFire in interface IlrAgendaFilter
Parameters:
instance - The rule instance to be filtered.
Returns:
true if the rule defines the property and the property is assigned the specified value.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013