I have the following code in Java 1.8.
solver.plugMonitor((IMonitorSolution) () -> solution.record(solver));
How can I convert this to Java 1.7 code without lambda?
The plugMonitor
method requires an argument of type IMonitorSolution
, with some method YMethod
that has no arguments :
solver.plugMonitor (new IMonitorSolution () {
public void YMethod () {
solution.record(solver);
}
});
Thanks to @Boann for correcting my error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With