Make it possible to supply a RunQueue after the fact for callers who have a

RunQueue that might be null.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2530 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-02-13 18:26:48 +00:00
parent da5ac674e4
commit 4584b053e2
@@ -69,6 +69,17 @@ public abstract class Interval
* method. If null is supplied the interval will be run directly on the timer thread.
*/
public Interval (RunQueue runQueue)
{
setRunQueue(runQueue);
}
/**
* Configures the run queue to be used by this interval. This <em>must</em> be called before
* the interval is started and a non-null queue must be provided. This exists for situations
* where the caller needs to configure an optional run queue and thus can't easily call the
* appropriate constructor.
*/
public void setRunQueue (RunQueue runQueue)
{
if (runQueue == null) {
throw new IllegalArgumentException("Supplied RunQueue must be non-null");