From 99fa4e29da7c3fa9df012378640442b59ebd1724 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 22 May 2008 15:48:51 +0000 Subject: Bugfix --- sources/core/VSTask.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sources/core/VSTask.java') 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) { -- cgit v1.2.3