|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.model.VariableArray
choco.kernel.model.ModelObject
choco.kernel.model.variables.AbstractVariable
choco.kernel.model.variables.ComponentVariable
choco.kernel.model.variables.integer.IntegerExpressionVariable
choco.kernel.model.variables.integer.IntegerVariable
choco.kernel.model.variables.integer.IntegerConstantVariable
public final class IntegerConstantVariable
Nested Class Summary |
---|
Nested classes/interfaces inherited from class choco.kernel.model.variables.ComponentVariable |
---|
ComponentVariable.ConstraintsDataStructure |
Nested classes/interfaces inherited from class choco.kernel.model.VariableArray |
---|
VariableArray.VConstraintsDataStructure |
Field Summary |
---|
Fields inherited from class choco.kernel.model.variables.integer.IntegerVariable |
---|
_iterator, values |
Fields inherited from class choco.kernel.model.variables.integer.IntegerExpressionVariable |
---|
lowB, uppB |
Fields inherited from class choco.kernel.model.variables.ComponentVariable |
---|
expressionManager, NO_CONSTRAINTS_DS, operator, parameters, variableManager |
Fields inherited from class choco.kernel.model.variables.AbstractVariable |
---|
name, type |
Fields inherited from class choco.kernel.model.VariableArray |
---|
NO_CONSTRAINTS |
Fields inherited from interface choco.kernel.model.variables.Variable |
---|
LOGGER |
Fields inherited from interface choco.kernel.model.variables.IHook |
---|
NO_HOOK |
Constructor Summary | |
---|---|
IntegerConstantVariable(int value)
|
Method Summary | |
---|---|
int |
compareTo(Object o)
Compares this object with the specified object for order. |
boolean |
equals(Object o)
|
int |
getValue()
|
String |
pretty()
pretty printing of the object. |
void |
setLowB(int lowB)
|
void |
setUppB(int uppB)
|
Methods inherited from class choco.kernel.model.variables.integer.IntegerVariable |
---|
canBeEqualTo, doExtractVariables, enumVal, getDomainIterator, getDomainSize, getValues, isBoolean, isConstant, removeVal |
Methods inherited from class choco.kernel.model.variables.integer.IntegerExpressionVariable |
---|
getExpressionVariable, getLowB, getUppB |
Methods inherited from class choco.kernel.model.variables.ComponentVariable |
---|
findManager, getComponentClass, getConstraintManager, getExpressionManager, getOperator, getOperatorClass, getParameters, getVariableManager |
Methods inherited from class choco.kernel.model.variables.AbstractVariable |
---|
_addConstraint, _contains, _removeConstraint, getConstraint, getConstraintIterator, getConstraintIterator, getConstraints, getHook, getName, getNbConstraint, getNbConstraint, getVariableType, removeConstraints, resetHook, setHook, setName, throwConstantException, toString |
Methods inherited from class choco.kernel.model.ModelObject |
---|
addOption, addOptions, addOptions, addOptions, addOptions, containsOption, getIndex, getOptions, hashCode |
Methods inherited from class choco.kernel.model.VariableArray |
---|
cancelExtractVariables, extractVariables, forceExtractVariables, getNbVars, getVariable, getVariableIterator, getVariables, replaceBy, replaceByConstantAt, setVariables, setVariables |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface choco.kernel.model.IVariableArray |
---|
extractVariables, getNbVars, getVariable, getVariableIterator, getVariables, replaceBy |
Methods inherited from interface choco.kernel.common.IIndex |
---|
getIndex |
Methods inherited from interface choco.kernel.model.IOptions |
---|
addOption, addOptions, addOptions, addOptions, addOptions, containsOption, getOptions |
Constructor Detail |
---|
public IntegerConstantVariable(int value)
Method Detail |
---|
public int getValue()
public void setLowB(int lowB)
setLowB
in interface IntBoundedVariable
setLowB
in class IntegerExpressionVariable
public void setUppB(int uppB)
setUppB
in interface IntBoundedVariable
setUppB
in class IntegerExpressionVariable
public boolean equals(Object o)
equals
in class Object
public String pretty()
pretty
in interface IPretty
pretty
in class IntegerVariable
public int compareTo(Object o)
AbstractVariable
The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception iff y.compareTo(x) throws an exception.)
The implementor must also ensure that the relation is transitive: (x.compareTo(y)>0 && y.compareTo(z)>0) implies x.compareTo(z)>0.
Finally, the implementor must ensure that x.compareTo(y)==0 implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for all z.
It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."
In the foregoing description, the notation sgn(expression) designates the mathematical signum function, which is defined to return one of -1, 0, or 1 according to whether the value of expression is negative, zero or positive.
compareTo
in interface Comparable
compareTo
in class AbstractVariable
o
- the object to be compared.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |