diff options
Diffstat (limited to 'sources/core/VSTask.java')
| -rw-r--r-- | sources/core/VSTask.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java index 8f1e634..131cede 100644 --- a/sources/core/VSTask.java +++ b/sources/core/VSTask.java @@ -16,6 +16,8 @@ public class VSTask implements Comparable { private VSPrefs prefs; private boolean isProgrammed; private boolean isGlobalTimed; + private static int taskCounter; + private int taskNum; public VSTask(long taskTime, VSProcess process, VSEvent event, boolean isLocal) { this.process = process; @@ -23,8 +25,13 @@ public class VSTask implements Comparable { this.event = event; this.prefs = process.getPrefs(); this.isGlobalTimed = !isLocal; + this.taskNum = ++taskCounter; } + public int getTaskNum() { + return taskNum; + } + public void isProgrammed(boolean isProgrammed) { this.isProgrammed = isProgrammed; } @@ -34,11 +41,11 @@ public class VSTask implements Comparable { } public boolean isMessageReceiveEvent() { - return event instanceof events.internal.MessageReceiveEvent; + return event instanceof MessageReceiveEvent; } public boolean isProcessRecoverEvent() { - return event instanceof events.implementations.ProcessRecoverEvent; + return event instanceof ProcessRecoverEvent; } public boolean isProtocol(VSProtocol protocol) { @@ -56,10 +63,13 @@ public class VSTask implements Comparable { } public boolean equals(VSTask task) { + return taskNum == task.getTaskNum(); + /* return event.equals(task.getEvent()) && taskTime == task.getTaskTime() && isGlobalTimed == task.isGlobalTimed() && isProgrammed == task.isProgrammed; + */ } public boolean isProcess(VSProcess process) { |
