|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Base interface class for set based variables
| Method Summary | |
void |
addRequired(java.lang.Object req)
Adds a required value to the set of required values |
void |
addRequired(java.util.Set req)
Adds a set of required values |
java.lang.String |
getName()
Returns the name of the variable |
int |
getPossibleCardinality()
Returns the cardinality of the set of possible values |
java.util.Set |
getPossibleSet()
Returns the possible set of values in this variable's domain |
int |
getRequiredCardinality()
Returns the cardinality of the set of required values |
java.util.Set |
getRequiredSet()
Returns the required set of values in this variable's domain |
int |
getSize()
Returns 1 + (cardinality of possible) - (cardinality of required) |
boolean |
isInDomain(java.lang.Object val)
Returns true if the specified value is in this variable's domain |
boolean |
isPossible(java.lang.Object value)
Returns true if the specified value is in the set of possible values |
boolean |
isRequired(java.lang.Object value)
Returns true if the specified value is in the set of required values |
void |
removePossible(java.lang.Object value)
Removes a value from the possible set |
void |
removePossible(java.util.Set values)
Removes a set of values from the possible set |
void |
setName(java.lang.String name)
Sets the name of the variable |
| Methods inherited from interface jopt.csp.variable.CspVariable |
isBound |
| Method Detail |
public java.lang.String getName()
getName in interface CspVariablepublic void setName(java.lang.String name)
name - new name for this variablepublic java.util.Set getPossibleSet()
public java.util.Set getRequiredSet()
public int getPossibleCardinality()
public int getRequiredCardinality()
public int getSize()
getSize in interface CspVariable
public void addRequired(java.lang.Object req)
throws PropagationFailureException
req - object to add to required set
PropagationFailureExceptionpublic boolean isInDomain(java.lang.Object val)
val - object being inquired about
public boolean isRequired(java.lang.Object value)
value - object being inquired about
public boolean isPossible(java.lang.Object value)
value - object being inquired about
public void removePossible(java.lang.Object value)
throws PropagationFailureException
value - object to be removed from possible
PropagationFailureException
public void removePossible(java.util.Set values)
throws PropagationFailureException
values - set of value to be removed from possible
PropagationFailureException
public void addRequired(java.util.Set req)
throws PropagationFailureException
req - set of value to be added to required
PropagationFailureException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||