|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.oakgrovesystems.mediation.AbstractConditionalChange
An implementation of the ConditionalChange interface. Subclasses need not implement any additional methods to be useful. They only need to initialize the precondition and resultingChange fields.
Field Summary | |
protected com.oakgrovesystems.mediation.Condition |
precondition
The Condition that must be true for the Change to be applicable. |
protected com.oakgrovesystems.mediation.Change |
resultingChange
The Change that is applied when applyTo() is called and the precondition is true. |
Constructor Summary | |
AbstractConditionalChange()
|
Method Summary | |
void |
applyTo(java.lang.Object o)
Applies this Change to the specified Object. |
boolean |
isApplicable()
Tests the applicability of this ConditionalChange. |
boolean |
isMadeApplicableBy(com.oakgrovesystems.mediation.Change triggeringChange,
java.lang.Object changee)
Determines whether the ConditionalChange would become applicable if the specified Change was applied to the specified object. |
boolean |
isMadeInapplicableBy(com.oakgrovesystems.mediation.Change untriggeringChange,
java.lang.Object changee)
Determines whether the ConditionalChange would become inapplicable if the specified Change was applied to the specified object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.oakgrovesystems.mediation.Condition precondition
protected com.oakgrovesystems.mediation.Change resultingChange
Constructor Detail |
public AbstractConditionalChange()
Method Detail |
public boolean isApplicable() throws CanNotEvaluateConditionException
isApplicable
in interface ConditionalChange
CanNotEvaluateConditionException
- thrown if the contingency Condition can not be evaluated.public boolean isMadeApplicableBy(com.oakgrovesystems.mediation.Change triggeringChange, java.lang.Object changee) throws CanNotEvaluateConditionException
isMadeApplicableBy
in interface ConditionalChange
changee
- the object to which the triggering change would be appliedtriggeringChange
- the Change that would be applied to trigger the applicability of
this ConditionalChange
CanNotEvaluateConditionException
public boolean isMadeInapplicableBy(com.oakgrovesystems.mediation.Change untriggeringChange, java.lang.Object changee) throws CanNotEvaluateConditionException
isMadeInapplicableBy
in interface ConditionalChange
changee
- the object to which the specified change would be applied to make
this ConditionalChange inapplicableuntriggeringChange
- the Change that would be applied to cause the inapplicability of
this ConditionalChange
CanNotEvaluateConditionException
public void applyTo(java.lang.Object o) throws ChangeNotApplicableException
applyTo
in interface Change
o
-
ChangeNotApplicableException
- If isApplicable returns false or the change can not be applied or
can not be applied to the object specified.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |