public class Condition extends Element
Constructor and Description |
---|
Condition()
Creates a default Condition.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Predicate actual)
Determines whether this Condition would be satisfied by some actual
constraint.
|
Condition |
addPredicate(Predicate predicate)
Adds the guard Predicate to this Condition.
|
boolean |
evaluate()
Evaluates this guard Condition, returning true or false.
|
Predicate |
getComplement()
Returns the complement of the guard Predicate.
|
java.util.Set<Predicate> |
getPartitions()
Returns the set of all possible atomic predicates and their negations
that can be derived from this Condition's guard.
|
Predicate |
getPredicate()
Returns the Predicate guard.
|
Condition |
resolve(Scope scope)
Causes this Condition to resolve its global/local Parameter references.
|
safeEquals, safeHashCode, semanticError
public Condition addPredicate(Predicate predicate)
predicate
- the Predicate to attach.public Predicate getPredicate()
public Predicate getComplement()
public java.util.Set<Predicate> getPartitions()
public boolean accepts(Predicate actual)
actual
- a Predicate representing an actual constraint.public Condition resolve(Scope scope)
scope
- a table of global and local Parameters.public boolean evaluate()