javax.constraints.extra
Class AbstractReversible
java.lang.Object
javax.constraints.impl.CommonBase
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.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractReversible
public AbstractReversible(Problem problem,
int value)
AbstractReversible
public AbstractReversible(Problem problem,
java.lang.String name,
int value)
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