ilog.rules.engine

Class IlrPropertyFilter

  • java.lang.Object
    • ilog.rules.engine.IlrPropertyFilter
  • All Implemented Interfaces:
    IlrAgendaFilter, java.io.Serializable


    public class IlrPropertyFilter
    extends java.lang.Object
    implements IlrAgendaFilter, java.io.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

      Constructors 
      Constructor and Description
      IlrPropertyFilter(java.lang.String propertyKey, java.lang.Object propertyValue)
      Creates an IlrPropertyFilter.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      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(java.lang.String propertyKey,
                         java.lang.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.

© Copyright IBM Corp. 1987, 2017