From 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 Mon Sep 17 00:00:00 2001 From: abranson Date: Thu, 4 Aug 2011 00:42:34 +0200 Subject: More code cleanup: Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class --- source/com/c2kernel/gui/tabs/execution/ActivityItem.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/com/c2kernel/gui/tabs/execution/ActivityItem.java') diff --git a/source/com/c2kernel/gui/tabs/execution/ActivityItem.java b/source/com/c2kernel/gui/tabs/execution/ActivityItem.java index ba5e76b..6a8f2f7 100644 --- a/source/com/c2kernel/gui/tabs/execution/ActivityItem.java +++ b/source/com/c2kernel/gui/tabs/execution/ActivityItem.java @@ -9,7 +9,7 @@ public class ActivityItem { public int state; public String name; ArrayList jobs = new ArrayList(); - + public ActivityItem() { stepPath = ""; state = -1; @@ -27,7 +27,7 @@ public class ActivityItem { jobs.add(newJob); } - public ArrayList getJobs() { + public ArrayList getJobs() { return jobs; } @@ -35,16 +35,19 @@ public class ActivityItem { return stepPath; } - public String toString() { + @Override + public String toString() { return name+(state>-1?" ("+States.getStateName(state)+")":""); } - public boolean equals(Object other) { + @Override + public boolean equals(Object other) { if (other instanceof ActivityItem) return hashCode() == ((ActivityItem)other).hashCode(); return false; } - + + @Override public int hashCode() { return stepPath.hashCode(); } -- cgit v1.2.3