public class EventNote extends java.lang.Object implements java.lang.Comparable<EventNote>
Schedulable
, event
or process. Since EventNote
are tightly coupled with the EventList
, a change
of the EventList
might alo force the EventNote
to contain other information
especially concerning the data structures used in the EventList
as well. To adopt
the Event notes
extend them to carry the specific data and methods you need
for a possible change of the EventList
. The implementation here includes
data and methods for event information only, since the default implementation
of class EventVector
needs no special information stored
inside the Event notes
.Constructor and Description |
---|
EventNote(Entity who1,
Entity who2,
Entity who3,
EventAbstract what,
TimeInstant when,
int howImportant,
Schedulable source)
Event notes can only be created if all relevant data can be supplied at
creation time.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(EventNote note)
Compares the given EventNote to this event-note.
|
EventNote |
copy(Schedulable source)
Copies the event-note.
|
boolean |
equals(java.lang.Object object)
Returns whether this
EventNote equals another one or not. |
Entity |
getEntity1()
Returns the entity that is associated with this event-note.
|
Entity |
getEntity2()
Returns the entity that is associated with this event-note.
|
Entity |
getEntity3()
Returns the entity that is associated with this event-note.
|
EventAbstract |
getEvent()
Returns the event associated with this event-note.
|
long |
getNumberOfEntities()
Returns the number of included entities.
|
int |
getPriority()
Returns the priority of this event-note.
|
Schedulable |
getSource()
Returns the Schedulable that has created this event note.
|
TimeInstant |
getTime()
Returns the point of time associated with this event-note.
|
int |
hashCode()
Returns a hash code value for the object.
|
java.lang.String |
toString()
Returns a string representing the elements bundled in this event-note.
|
public EventNote(Entity who1, Entity who2, Entity who3, EventAbstract what, TimeInstant when, int howImportant, Schedulable source)
who1
- Entity : The first entity that is scheduled to be change during the
course of the event or the SimProcess (or null, if such an entity is not defined)who2
- Entity : The second entity that is scheduled to be change during the
course of the event or the SimProcess (or null, if such an entity is not defined)who3
- Entity : The third entity that is scheduled to be change during the
course of the event or the SimProcess (or null, if such an entity is not defined)what
- Event : The type of Event that scheduled to happen to the
Entity or entitieswhen
- TimeInstant : The point of time that this event-note is supposed to
be processed by the scheduling mechanismhowImportant
- int : The scheduling priority of this event note. Higher means more important.source
- Schedulable : The Schedulable responsible for creating this event notepublic EventNote copy(Schedulable source)
source
- Schedulable : The Schedulable responsible for copying this event notepublic boolean equals(java.lang.Object object)
EventNote
equals another one or not.equals
in class java.lang.Object
true
or false
.public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(EventNote note)
compareTo
in interface java.lang.Comparable<EventNote>
note
- The event-note to be compared to this event-notepublic Entity getEntity1()
public Entity getEntity2()
public Entity getEntity3()
public EventAbstract getEvent()
public long getNumberOfEntities()
int
: The number of entitiespublic TimeInstant getTime()
public int getPriority()
public Schedulable getSource()
public java.lang.String toString()
toString()
methods of every element putting each
in brackets containing one or two letters to indicate the type of
element.
null
null
toString
in class java.lang.Object