public class VariablePrototype extends Variable
Variable is to
invoke a ConstraintSolver's factory methods, which in turn perform other operations to keep track of the created variable(s).
If a variable is to be used only as a prototype, then all of these operations can be skipped, and this class used. Variable prototypes are
not used for reasoning, rather real Variables are automatically instantiated through the factory methods of concrete ConstraintSolvers on the
basis of the information contained in variable prototypes.| Modifier and Type | Field and Description |
|---|---|
static int |
id
Static ID counter for
VariablePrototypes. |
protected java.lang.Object[] |
parameters |
attributes, backupForSerialization, dependentVariables, logger, solver| Constructor and Description |
|---|
VariablePrototype(ConstraintSolver cs,
java.lang.Object... parameters)
Create a new
VariablePrototype with a given ConstraintSolver and given parameters. |
| Modifier and Type | Method and Description |
|---|---|
VariablePrototype |
clone() |
int |
compareTo(Variable arg0) |
Domain |
getDomain()
Get the domain of this Variable.
|
java.lang.Object[] |
getParameters()
Get the parameters of this
VariablePrototype. |
void |
setDomain(Domain d)
Set the domain of this variable.
|
java.lang.String |
toString()
Get a
String representation of this Variable. |
addDependentVariables, dependsOn, equals, getAncestorVariable, getAttributes, getColor, getComponent, getConstraintSolver, getDependentVariables, getDescription, getID, getMarking, getOwner, getParentVariable, getRecursivelyDependentVariables, getRootVariable, hashCode, isDependentVariable, removeDependentVariables, setAttributes, setColor, setComponent, setDependentVariables, setMarking, setOwner, setParentVariableprotected java.lang.Object[] parameters
public static int id
VariablePrototypes.public VariablePrototype(ConstraintSolver cs, java.lang.Object... parameters)
VariablePrototype with a given ConstraintSolver and given parameters.cs - The ConstraintSolver to which concrete Variables created on the basis of this prototype
should refer to.parameters - Parameters useful for the creation of a concrete Variable.public java.lang.Object[] getParameters()
VariablePrototype.VariablePrototype.public int compareTo(Variable arg0)
public Domain getDomain()
Variablepublic void setDomain(Domain d)
Variablepublic java.lang.String toString()
VariableString representation of this Variable.public VariablePrototype clone()
clone in class java.lang.Object