|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.oakgrovesystems.mediation.Disjunction
A compound Condition (a Condition that is a boolean function of the state of one or more other Conditions). Specfically, a Disjunction is a function of a set of other Conditions. If one or more of the other Conditions are true, the Disjunction is true. If all of the other Conditions are false, the Disjunction is false.
Field Summary | |
protected java.util.Set |
conditions
|
Constructor Summary | |
Disjunction(java.util.Set conditions)
Creates a new Disjunction that is a function of the specified Set of other Conditions |
Method Summary | |
java.util.Set |
getConditions()
returns the Set of Conditions of which this Disjunction is a function. |
boolean |
isMadeFalseBy(com.oakgrovesystems.mediation.Change c,
java.lang.Object o)
Returns true if at least one of the Conditions in the set is currently true, and all of the Condtions in the Set that are currently true return true from a call to Condition.isMadeFalseBy() with the same arguments. |
boolean |
isMadeTrueBy(com.oakgrovesystems.mediation.Change c,
java.lang.Object o)
Returns true if all of the Conditions in the set are currently false, but at least one of them returns true from a call to Condition.isMadeTrueBy() with the same arguments. |
boolean |
isTrue()
returns true if one or more of the Conditions in the Set are true, false if all of the Conditions in the Set are false. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Set conditions
Constructor Detail |
public Disjunction(java.util.Set conditions)
conditions
- The set of Conditions that this Disjunction is a function of.Method Detail |
public java.util.Set getConditions()
public boolean isTrue() throws CanNotEvaluateConditionException
isTrue
in interface Condition
CanNotEvaluateConditionException
- if the Set is null or contains an object that does not implement the
Condition interface or if one of the Conditions in the Set can not be
evaluated.public boolean isMadeTrueBy(com.oakgrovesystems.mediation.Change c, java.lang.Object o) throws CanNotEvaluateConditionException
isMadeTrueBy
in interface Condition
c
- The Change the application of which may make this Disjunction true.o
- The Object to which the Change would be applied
CanNotEvaluateConditionException
- if the Set is null or contains an object that does not implement the
Condition interface or a Condition in the Set can not be evaluated.public boolean isMadeFalseBy(com.oakgrovesystems.mediation.Change c, java.lang.Object o) throws CanNotEvaluateConditionException
isMadeFalseBy
in interface Condition
c
- The Change the application of which may make this Disjunction false.o
- The Object to which the Change would be applied
CanNotEvaluateConditionException
- if the Set is null or contains an object that does not implement the
Condition interface or a Condition in the Set can not be evaluated.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 |