Use a nice toString() for posted Runnables.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2124 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2007-07-09 20:38:44 +00:00
parent d47927b749
commit 03040c0258
+9 -2
View File
@@ -41,7 +41,10 @@ public class Invoker extends LoopingThread
public long queueStamp;
/** The default constructor. */
public Unit () {}
public Unit ()
{
this("Unknown");
}
/** Creates an invoker unit which will report the supplied name in
* {@link #toString}. */
@@ -88,7 +91,7 @@ public class Invoker extends LoopingThread
return _name;
}
protected String _name = "Unknown";
protected String _name;
}
/**
@@ -131,6 +134,10 @@ public class Invoker extends LoopingThread
r.run();
return false;
}
public String toString () {
return "Posted Runnable: " + String.valueOf(r);
}
});
}