diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-22 15:48:51 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-22 15:48:51 +0000 |
| commit | 99fa4e29da7c3fa9df012378640442b59ebd1724 (patch) | |
| tree | 3f316bf86837830aa5242ef0d99a2c0fd67b6709 /sources/core/VSTask.java | |
| parent | 68ca748737bbf5af57888872a9c072415e609d23 (diff) | |
Bugfix
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) { |
