|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.constraints.impl.CommonBase
javax.constraints.impl.AbstractConstraint
public abstract class AbstractConstraint
This is a base implementation for all
| Constructor Summary | |
|---|---|
AbstractConstraint(Problem problem)
|
|
AbstractConstraint(Problem problem,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
Constraint |
and(Constraint c)
Returns an "AND" Constraint. |
VarBool |
asBool()
This method returns a Var variable that is equal 1 if the constraint is satisfied and equals 0 if it is violated. |
Constraint |
implies(Constraint c)
Returns a Constraint that states the implication: this => c. |
Constraint |
negation()
Returns a Constraint that is satisfied if and only if this constraint is not satisfied. |
Constraint |
or(Constraint c)
Returns an "OR" Constraint. |
void |
post()
This method takes a constraint's implementation and uses its own RI-specific post-method. |
void |
post(ConsistencyLevel consistencyLevel)
This method is used to post the constraint. |
| Methods inherited from class javax.constraints.impl.CommonBase |
|---|
getImpl, getName, getObject, getProblem, setImpl, setName, setObject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.constraints.Constraint |
|---|
getImpl, getName, getObject, getProblem, setImpl, setName, setObject |
| Constructor Detail |
|---|
public AbstractConstraint(Problem problem)
public AbstractConstraint(Problem problem,
java.lang.String name)
| Method Detail |
|---|
public Constraint and(Constraint c)
and in interface Constraintc - the Constraint which is part of the new "AND" Constraint
public VarBool asBool()
asBool in interface Constraintpublic Constraint implies(Constraint c)
implies in interface Constraintc - the Constraint in the implication.
public Constraint negation()
negation in interface Constraintpublic Constraint or(Constraint c)
or in interface Constraintc - the Constraint which is part of the new "OR" Constraint
public void post()
post in interface Constraintjava.lang.RuntimeException - if a failure happened during the postingpublic void post(ConsistencyLevel consistencyLevel)
post in interface ConstraintconsistencyLevel -
java.lang.RuntimeException - if a failure happened during the posting
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||