From 2d20fd345485bb43e3a8fe48f358c69cfd73cfc5 Mon Sep 17 00:00:00 2001 From: "ray.j.greenwell" Date: Thu, 10 Dec 2009 19:58:35 +0000 Subject: [PATCH] For debugging, an Interval's toString() should be informative. The RunBuddy posted to a RunQueue will call its Interval's toString() method. If an Interval is created with a Runnable, let's call the Runnable's toString(). We could also add a form of create() that takes a String for the name... git-svn-id: https://samskivert.googlecode.com/svn/trunk@2676 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/util/Interval.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/java/com/samskivert/util/Interval.java b/src/java/com/samskivert/util/Interval.java index 518e5065..3072d4f1 100644 --- a/src/java/com/samskivert/util/Interval.java +++ b/src/java/com/samskivert/util/Interval.java @@ -55,6 +55,10 @@ public abstract class Interval @Override public void expired () { onExpired.run(); } + + @Override public void toString () { + return onExpired.toString(); + } }; } @@ -71,6 +75,10 @@ public abstract class Interval @Override public void expired () { onExpired.run(); } + + @Override public void toString () { + return onExpired.toString(); + } }; }