com.github.tamnguyenbbt.task.TaskExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dom-util Show documentation
Show all versions of dom-util Show documentation
Find jsoup elements, relative xpath queries, and Selenium web elements for web service and Selenium-based Web UI testing
package com.github.tamnguyenbbt.task;
import java.util.concurrent.Callable;
public class TaskExecutor implements Callable
{
private final ITask task;
public TaskExecutor(ITask task)
{
this.task = task;
}
public ITask getTask()
{
return task;
}
@Override
public T call() throws Exception
{
T functionParam = task.getFunctionParam();
return (T)task.getFunction().apply(functionParam);
}
}