javax.constraints.impl.Reversible Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr331-sugar Show documentation
Show all versions of jsr331-sugar Show documentation
This is a JSR331 interface for the open source Java constraint programming library "Sugar" v. 2.1.3
The newest version!
package javax.constraints.impl;
import javax.constraints.Problem;
import javax.constraints.extra.AbstractReversible;
/**
* This class implements reversible integers that
* automatically restore their values when a solver backtracks.
*/
public class Reversible extends AbstractReversible {
public Reversible(Problem problem, int value) {
this(problem, "", value);
}
public Reversible(Problem problem, String name, int value) {
super(problem, name, value);
// TODO JSR331 Implementation
throw new RuntimeException("Reversible is not supported");
}
public int getValue() {
// TODO JSR331 Implementation
return -1;
}
public void setValue(int value) {
// TODO JSR331 Implementation
}
}