com.oakgrovesystems.mediation
Interface Condition

All Known Subinterfaces:
ProcessCondition
All Known Implementing Classes:
AbstractProcessCondition, Conjunction, Disjunction, Inversion, ProcessConditionConjunction, ProcessConditionDisjunction, ProcessConditionInversion

public interface Condition

A Condition is a boolean function of the state of one or more other objects. That is, for a given state of the other objects, the Condition is either true or false. Changes in the states of the other objects may cause the Condition's boolean value to change.

Author:
Craig Vieregg

Method Summary
 boolean isMadeFalseBy(com.oakgrovesystems.mediation.Change change, java.lang.Object changee)
          Determines if this Condition would become false if the specified Change were applied to the specified object.
 boolean isMadeTrueBy(com.oakgrovesystems.mediation.Change change, java.lang.Object changee)
          Determines if this Condition would become true if the specified Change were applied to the specified object.
 boolean isTrue()
          Evaluates this Condition
 

Method Detail

isTrue

public boolean isTrue()
               throws CanNotEvaluateConditionException
Evaluates this Condition

Returns:
True if the Condition evaluates to true. False if the Condition evaluates to false.
Throws:
CanNotEvaluateConditionException - If the Condition can not be evaluated.

isMadeTrueBy

public boolean isMadeTrueBy(com.oakgrovesystems.mediation.Change change,
                            java.lang.Object changee)
                     throws CanNotEvaluateConditionException
Determines if this Condition would become true if the specified Change were applied to the specified object.

Parameters:
change - The Change the application of which may make this Condition true.
changee - The Object to which the Change would be applied.
Returns:
False if this Condition is already true or if this Condition is currently false and would remain false despite the application of the specified Change. True if this Condition is currently false, but would be true if the specified Change were applied to the specified object.
Throws:
CanNotEvaluateConditionException - if the Condition can not be evaluated or it can not be determined how the specified Change would affect the evaluation of this Conditon.

isMadeFalseBy

public boolean isMadeFalseBy(com.oakgrovesystems.mediation.Change change,
                             java.lang.Object changee)
                      throws CanNotEvaluateConditionException
Determines if this Condition would become false if the specified Change were applied to the specified object.

Parameters:
change - The Change the application of which may make this Condition false.
changee - The Object to which the Change would be applied.
Returns:
False if this Condition is already false or if this Condition is currently true and would remain true despite the application of the specified Change. True if this Condition is currently true, but would be false if the specified Change were applied to the specified object.
Throws:
CanNotEvaluateConditionException - if the Condition can not be evaluated or it can not be determined how the specified Change would affect the evaluation of this Conditon.


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.