Class JavaDecisionBuilder
- java.lang.Object
-
- com.google.ortools.constraintsolver.BaseObject
-
- com.google.ortools.constraintsolver.DecisionBuilder
-
- com.google.ortools.constraintsolver.JavaDecisionBuilder
-
public class JavaDecisionBuilder extends DecisionBuilder
This class acts as a intermediate step between a c++ decision builder and a java one. Its main purpose is to catch the java exception launched when a failure occurs during the Next() call, and to return silently a FailDecision that will propagate the failure back to the C++ code.
-
-
Field Summary
-
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn
-
-
Constructor Summary
Constructors Constructor Description JavaDecisionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decisionnext(Solver solver)This is the new method to subclass when defining a java decision builder.DecisionnextWrap(Solver solver)This methods wraps the calls to next() and catches fail exceptions.-
Methods inherited from class com.google.ortools.constraintsolver.DecisionBuilder
delete, finalize, getCPtr, GetName, set_name, swigDirectorDisconnect, swigRelease, swigReleaseOwnership, swigTakeOwnership, toString
-
Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease
-
-
-
-
Method Detail
-
nextWrap
public final Decision nextWrap(Solver solver)
This methods wraps the calls to next() and catches fail exceptions.- Overrides:
nextWrapin classDecisionBuilder
-
next
public Decision next(Solver solver) throws Solver.FailException
This is the new method to subclass when defining a java decision builder.- Throws:
Solver.FailException
-
-