javax.constraints.extra
Class AbstractReversible

java.lang.Object
  extended by javax.constraints.impl.CommonBase
      extended by javax.constraints.extra.AbstractReversible
All Implemented Interfaces:
Reversible

public abstract class AbstractReversible
extends CommonBase
implements Reversible

This class implements reversible integers that automatically restore their values when a solver backtracks.


Constructor Summary
AbstractReversible(Problem problem, int value)
           
AbstractReversible(Problem problem, java.lang.String name, int value)
           
 
Method Summary
abstract  int getValue()
           
abstract  void setValue(int value)
           
 java.lang.String toString()
           
 
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, wait, wait, wait
 

Constructor Detail

AbstractReversible

public AbstractReversible(Problem problem,
                          int value)

AbstractReversible

public AbstractReversible(Problem problem,
                          java.lang.String name,
                          int value)
Method Detail

getValue

public abstract int getValue()
Specified by:
getValue in interface Reversible

setValue

public abstract void setValue(int value)
Specified by:
setValue in interface Reversible

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object