From d7bd211de618dbbca9b864a2a014f2f2bf73c374 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Mon, 10 Sep 2018 23:20:14 +0300 Subject: [PATCH] constructors instead of setters --- .../thmmy/mthmmy/utils/parsing/NewParseTask.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java index 5af4a172..ec1da28e 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/parsing/NewParseTask.java @@ -40,6 +40,20 @@ public abstract class NewParseTask extends AsyncTask { super.onPostExecute(v); } + public NewParseTask(OnParseTaskStartedListener onParseTaskStartedListener, OnParseTaskCancelledListener onParseTaskCancelledListener, + OnParseTaskFinishedListener onParseTaskFinishedListener) { + this.onParseTaskStartedListener = onParseTaskStartedListener; + this.onParseTaskCancelledListener = onParseTaskCancelledListener; + this.onParseTaskFinishedListener = onParseTaskFinishedListener; + } + + public NewParseTask(OnParseTaskStartedListener onParseTaskStartedListener, OnParseTaskFinishedListener onParseTaskFinishedListener) { + this.onParseTaskStartedListener = onParseTaskStartedListener; + this.onParseTaskFinishedListener = onParseTaskFinishedListener; + } + + public NewParseTask() { } + public void setOnParseTaskStartedListener(OnParseTaskStartedListener onParseTaskStartedListener) { this.onParseTaskStartedListener = onParseTaskStartedListener; }