|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjasi.sim.basic.event.EventAdapter
public final class EventAdapter
Basic implementation of methods and behavior for all simulation events. This
class can be used, when simulation can not extend the class
EventBean
AbstractEventBean
Constructor Summary | |
---|---|
EventAdapter(Event event,
Id id)
Construct an event. |
Method Summary | |
---|---|
void |
addEventListener(EventListener listener)
Add a model for this event. |
int |
compareTo(Event event,
Event e)
Compares that object with the specified object for order. |
boolean |
equals(Event event,
java.lang.Object o)
Indicates whether some other object is "equal to" that event. |
java.util.Collection<EventListener> |
getEventListeners()
Get the unmodifiable collection of the event listeners for this event. |
Id |
getId()
Retrieve the event's ID. |
int |
getPriority()
Retrieve the event's priority. |
Time |
getTime()
Retrieve the event's time. |
int |
hashCode(Event event)
Returns a hash code value for that event. |
void |
imported()
This event was pushed to a calendar. |
boolean |
isInitialized()
Check, if this event has just been created. |
boolean |
isPopped()
Check, if this event has already been popped and executed. |
boolean |
isPushed()
Check, if this event has already been pushed to a calendar. |
Event |
popped(Event event)
This event was popped from a calendar. |
Event |
pushed(Event event)
This event was pushed to a calendar. |
void |
removeEventListener(EventListener listener)
Remove a model for this event. |
void |
setId(Event event,
Id id)
Set the event's ID. |
void |
setPriority(Event event,
int priority)
Initialize the event's priority. |
void |
setTime(Event event,
Time time)
Initialize the event's time. |
java.lang.String |
toString(Event event)
Returns a string representation of that event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventAdapter(Event event, Id id)
event
- That event.id
- The ID.Method Detail |
---|
public void imported()
public Event pushed(Event event)
event
- That event.
public Event popped(Event event)
event
- That event.
public java.lang.String toString(Event event)
event
- That event.
public int hashCode(Event event)
event
- That event.
public boolean equals(Event event, java.lang.Object o)
event
- That event.o
- That object which is compared with this object.
public int compareTo(Event event, Event e)
event
- That event.e
- The event to be compared.
public boolean isInitialized()
public boolean isPushed()
public boolean isPopped()
public java.util.Collection<EventListener> getEventListeners()
public void addEventListener(EventListener listener)
listener
- The model to handle the event.public void removeEventListener(EventListener listener)
listener
- The model to handle the event.public void setId(Event event, Id id)
event
- That event.id
- The ID.public Id getId()
public void setTime(Event event, Time time)
event
- That event.time
- The event's time.
EventAlreadyInitializedException
- Whenever already initialized.public Time getTime()
public void setPriority(Event event, int priority)
event
- That event.priority
- The event's priority.
EventAlreadyInitializedException
- Whenever already initialized.public int getPriority()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |