/* Timer.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
* firing the first event.
*
* @param d The time gap between the subsequent events, in milliseconds
+ *
+ * @throws IllegalArgumentException if <code>d</code> is less than zero.
*/
public void setDelay(int d)
{
+ if (d < 0)
+ throw new IllegalArgumentException("Invalid delay: " + d);
delay = d;
}
* subsequent events.
*
* @param i the initial delay, in milliseconds
+ *
+ * @throws IllegalArgumentException if <code>i</code> is less than zero.
*/
public void setInitialDelay(int i)
{
+ if (i < 0)
+ throw new IllegalArgumentException("Invalid initial delay: " + i);
initialDelay = i;
}