|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.brb.implementor.RuleRange
Constraint type rule algorithm that returns a true ConstraintReturn if a <= x <= b, where x arrives as a firing parameter and a and b are either provided as initialization parameters or as firing parameters.
Constructor Summary | |
---|---|
RuleRange()
Parameterless constructor for creating an instance of RuleRange. |
Method Summary | |
---|---|
java.lang.Object |
fire(TriggerPoint tp,
java.lang.Object target,
IRuleCopy rule,
java.lang.Object[] parms)
This is where the algorithm implemented by this rule is performed. |
java.lang.String |
getDescription()
The programmer's description of what the algorithm does. |
void |
init(java.lang.Object[] parms,
java.lang.String[] dependentRules,
java.lang.String userDefinedData,
IRuleCopy rule)
Initializes constants used by this rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RuleRange()
Method Detail |
public java.lang.Object fire(TriggerPoint tp, java.lang.Object target, IRuleCopy rule, java.lang.Object[] parms) throws BusinessRuleBeansException
init
method or
whether the parameters are all passed on the fire
. The first signature
takes only one firing parameter, the number to be evaluated. The other signature takes
three firing parameters: the lower bound, number to be tested, and
upper bound. A true ConstraintReturn is returned if the number to be
tested is in the range; a false constraint return is returned otherwise.
If the lower and upper bounds are passed on this method and the lower bound is greater than the upper bound, an exception is thrown. Also, if the wrong number of parameters is passed or if any parameters are null, an exception is thrown.
fire
in interface RuleImplementor
tp
- the trigger point which is firing this rule implementor.target
- the target object of the trigger pointrule
- the rule that the implementor is running on behalf of
BusinessRuleBeansException
public java.lang.String getDescription()
getDescription
in interface RuleImplementor
public void init(java.lang.Object[] parms, java.lang.String[] dependentRules, java.lang.String userDefinedData, IRuleCopy rule) throws BusinessRuleBeansException
If the lower and upper bounds are passed on this method and the lower bound is greater than the upper bound, an exception is thrown. Also, if the wrong number of parameters is passed or if any parameters are null, an exception is thrown.
init
in interface RuleImplementor
parms
- the parameters needed to initialize this RuleImplementordependentRules
- the names of the dependent rules to this rule; if there are none,
null is passeduserDefinedData
- userDefinedData property from the Rulerule
- the Rule on whose behalf the rule implementor is running
BusinessRuleBeansException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |