|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjasi.sim.basic.value.AbstractSimValueType
jasi.sim.basic.value.AbstractComparableObject<Event>
jasi.sim.basic.event.AbstractEventBean
public abstract class AbstractEventBean
Basic implementation of any simulation event. Events are sorted in first order by their time and in second order by their priority.
| Field Summary |
|---|
| Fields inherited from interface jasi.sim.basic.event.Event |
|---|
COMPARATOR, DEFAULT_PRIORITY |
| Constructor Summary | |
|---|---|
protected |
AbstractEventBean()
Construct an event. |
protected |
AbstractEventBean(Time time)
Construct event for a given time with default priority. |
protected |
AbstractEventBean(Time time,
EventListener listener)
Construct an event for a given time and priority. |
protected |
AbstractEventBean(Time time,
int priority)
Construct an event for a given time and priority. |
protected |
AbstractEventBean(Time time,
int priority,
EventListener listener)
Construct an event for a given time and priority. |
| Method Summary | |
|---|---|
void |
addEventListener(EventListener listener)
Add a model for this event. |
protected Calendar |
calendar()
Get the calendar of this event. |
int |
compareTo(Event e)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
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()
Returns a hash code value for the object. |
void |
imported(Calendar calendar)
This event was pushed to a calendar. |
boolean |
inform()
Request, if this event is an internal or external event. |
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(Calendar calendar)
This event was popped from a calendar. |
Event |
pushed(Calendar calendar)
This event was pushed to a calendar. |
void |
removeEventListener(EventListener listener)
Remove a model for this event. |
void |
setId(Id id)
Set the event's ID. |
void |
setPriority(int priority)
Initialize the event's priority. |
void |
setTime(Time time)
Initialize the event's time. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class jasi.sim.basic.value.AbstractComparableObject |
|---|
isEQ, isGE, isGT, isLE, isLT, isNE |
| Methods inherited from class jasi.sim.basic.value.AbstractSimValueType |
|---|
getContent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jasi.sim.basic.value.ExtendedComparable |
|---|
isEQ, isGE, isGT, isLE, isLT, isNE |
| Constructor Detail |
|---|
protected AbstractEventBean()
protected AbstractEventBean(Time time,
int priority)
time - The event's time.priority - The event's priority.protected AbstractEventBean(Time time)
time - The event's time.
protected AbstractEventBean(Time time,
int priority,
EventListener listener)
time - The event's time.priority - The event's priority.listener - The event listener (model).
protected AbstractEventBean(Time time,
EventListener listener)
time - The event's time.listener - The event listener (model).| Method Detail |
|---|
public final void imported(Calendar calendar)
imported in interface Eventcalendar - The calendar, where this event was pushed to.public final Event pushed(Calendar calendar)
pushed in interface Eventcalendar - The calendar, where this event was pushed to.
public Event popped(Calendar calendar)
popped in interface Eventcalendar - The calendar which popped this event.
protected final Calendar calendar()
public java.lang.String toString()
toString in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - That object which is compared with this object.
public final int compareTo(Event e)
compareTo in interface java.lang.Comparable<Event>compareTo in class AbstractComparableObject<Event>e - The event to be compared.
Comparable.compareTo(Object)public final boolean isInitialized()
isInitialized in interface Eventpublic final boolean isPushed()
isPushed in interface Eventpublic final boolean isPopped()
isPopped in interface Eventpublic final java.util.Collection<EventListener> getEventListeners()
getEventListeners in interface Eventpublic final void addEventListener(EventListener listener)
addEventListener in interface Eventlistener - The model to handle the event.public final void removeEventListener(EventListener listener)
removeEventListener in interface Eventlistener - The model to handle the event.public final void setId(Id id)
setId in interface SimObjectid - The ID.public final Id getId()
getId in interface SimObjectpublic final void setTime(Time time)
time - The event's time.public final Time getTime()
getTime in interface Eventpublic final void setPriority(int priority)
priority - The event's priority.public final int getPriority()
getPriority in interface Eventpublic boolean inform()
inform in interface Event
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||