|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunsw.cse.mica.tools.timer.TimerEvent
public class TimerEvent
A timer event. Each event consists of the following information:
Constructor Summary | |
---|---|
TimerEvent(java.lang.String type,
java.lang.String name,
long time)
Create a new one-off event of type type with name name and firing time time. |
|
TimerEvent(java.lang.String type,
java.lang.String name,
long time,
long period)
Create a new recurring event of type type with name name, firing time time and a delay of period ms between firings. |
|
TimerEvent(java.lang.String type,
java.lang.String name,
long time,
long period,
int count)
Create a new recurring event of type type with name name, firing time time and a delay of period ms between firings. |
Method Summary | |
---|---|
boolean |
addSlot(java.lang.String name,
java.util.List value)
Add a data slot to the event's map |
boolean |
addSlot(java.lang.String name,
java.lang.String value)
Add a data slot to the event's map |
int |
compareTo(java.lang.Object o)
Compare two events, ordering them by their firing time. |
void |
decCount()
Decrement the current count. |
int |
getCount()
Get the count, the number of times this event is still listed to fire. |
java.lang.String |
getName()
Get the name of the current event |
java.util.Iterator |
getSlotIterator()
Get an iterator over the slots (each item is a Map.Entry object) |
long |
getTime()
Get the next firing time for this event. |
java.lang.String |
getType()
Get the type of the current event |
boolean |
hasSlots()
Does the event have any data in its map? |
void |
incTime()
Increment the firing time for this event by the period. |
java.lang.String |
toString()
Return a string representation of this event. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimerEvent(java.lang.String type, java.lang.String name, long time)
public TimerEvent(java.lang.String type, java.lang.String name, long time, long period)
public TimerEvent(java.lang.String type, java.lang.String name, long time, long period, int count)
Method Detail |
---|
public java.lang.String getType()
public java.lang.String getName()
public boolean addSlot(java.lang.String name, java.util.List value)
name
- value
- public boolean addSlot(java.lang.String name, java.lang.String value)
name
- value
- public boolean hasSlots()
public int getCount()
public void decCount()
public long getTime()
public void incTime()
public java.util.Iterator getSlotIterator()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |