Skip to content

Commit

Permalink
Update Task.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhuvaneshw authored Apr 11, 2023
1 parent 35e519b commit 6b80dfd
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions task/src/main/java/com/acutecoder/task/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public class Task<T> {
private Callback onStart, onEnd;
private boolean isBackground = true, isRunning = false;

protected Task(Runnable<T> runnable) {
/**
* Creates a new Task instance
*
* @param runnable The task
*/
public Task(Runnable<T> runnable) {
this.runnable = runnable;
}

Expand Down Expand Up @@ -193,14 +198,4 @@ public TaskException(String msg, boolean isBackground) {
super("Error while executing " + (isBackground ? "Background" : "Foreground") + " task: " + msg);
}
}

/**
* For Java 1.7
*/
public static class Java_1_7<T> extends Task<T> {

public Java_1_7(Runnable<T> runnable) {
super(runnable);
}
}
}

0 comments on commit 6b80dfd

Please sign in to comment.