/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sw13.executorNegative;

import java.util.concurrent.Callable;


/**
 *
 * @author Steve Ineichen
 */
public class WorkerCallable implements Callable {
    final private Worker worker;
    
    public WorkerCallable(Worker worker) {
        this.worker = worker;
    }
    
    @Override
    public Integer call() throws InterruptedException {
        worker.doWork();
        return worker.getResult();
    }
}