public interface Constraint
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.Object |
getImpl()
This method should be defined by a concrete solver
implementation.
|
java.lang.String |
getName()
Returns the name of this object.
|
java.lang.Object |
getObject()
This method may be used to get an attached Business Object for this
object.
|
Problem |
getProblem()
Return a problem to which this object belongs
|
Constraint |
implies(Constraint c)
Returns a Constraint that states the implication: if this then 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 is used to post the
constraint.
|
void |
post(ConsistencyLevel consistencyLevel)
This method is used to post the constraint.
|
void |
post(java.lang.String name,
Probability probability)
This method is used to post the constraint assuming that it can be violated.
|
void |
setImpl(java.lang.Object impl)
This method defines an Object that represents an actual
implementation of this object inside a concrete solver.
|
void |
setName(java.lang.String name)
Sets the name of this object.
|
void |
setObject(java.lang.Object obj)
This method may be used to attach a business object to this
object.
|
Constraint and(Constraint c)
c
- the Constraint which is part of the new "AND" ConstraintVarBool asBool()
java.lang.Object getImpl()
java.lang.String getName()
java.lang.Object getObject()
Problem getProblem()
Constraint implies(Constraint c)
c
- the Constraint in the implication.Constraint negation()
Constraint or(Constraint c)
c
- the Constraint which is part of the new "OR" Constraintvoid post()
java.lang.RuntimeException
- if a failure happened during the postingvoid post(ConsistencyLevel consistencyLevel)
consistencyLevel
- java.lang.RuntimeException
- if a failure happened during the postingvoid post(java.lang.String name, Probability probability)
name
- of the constraintprobability
- java.lang.RuntimeException
- if a failure happened during the postingvoid setImpl(java.lang.Object impl)
impl
- the Object that represents an actual implementation of this
object inside a implementation solver.void setName(java.lang.String name)
name
- the name for this object.void setObject(java.lang.Object obj)
obj
- the business object being attached.