de.uni.freiburg.iig.telematik.sepia.overlap.ThreadedOverlapCalculator Maven / Gradle / Ivy
Show all versions of SEPIA Show documentation
package de.uni.freiburg.iig.telematik.sepia.overlap;
import java.util.concurrent.ExecutionException;
import de.invation.code.toval.thread.AbstractCallable;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractFlowRelation;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractMarking;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractPlace;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractTransition;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.threaded.AbstractThreadedPNPropertyChecker;
import de.uni.freiburg.iig.telematik.sewol.log.LogEntry;
public class ThreadedOverlapCalculator,
T extends AbstractTransition,
F extends AbstractFlowRelation,
M extends AbstractMarking,
S extends Object,
E extends LogEntry>
extends AbstractThreadedPNPropertyChecker
,
OverlapResult,
OverlapException>{
protected ThreadedOverlapCalculator(OverlapCallableGenerator generator){
super(generator);
}
@SuppressWarnings("unchecked")
@Override
protected OverlapCallableGenerator
getGenerator() {
return (OverlapCallableGenerator
) super.getGenerator();
}
@Override
protected AbstractCallable> createCallable() {
return new OverlapCallable(getGenerator());
}
@Override
protected OverlapException createException(String message, Throwable cause) {
return new OverlapException(message, cause);
}
@Override
protected OverlapException executionException(ExecutionException e) {
if(e.getCause() instanceof OverlapException)
return (OverlapException) e.getCause();
return new OverlapException("Exception during overlap calculation", e);
}
@Override
protected OverlapResult getResultFromCallableResult(OverlapResult callableResult) throws Exception {
return callableResult;
}
}