To allow the user to print the event list, the {@link java.lang.Object#toString toString} methodfrom the {@link Object} class should be reimplemented in all EventListimplementations. It will return a string in the following format: ``Contents of the event list event list class:'' for the first line and each subsequent line has format ``scheduled event time, event priority : event string''. The event string is obtained by calling the toString method of the event objects. The string should not end with the end-of-line character.
The following example is the event list of the bank example, printed at 10h30. See examples.pdf for more information.
Contents of the event list SplayTree: 10.51, 1 : BankEv$Arrival@cfb549 10.54, 1 : BankEv$Departure@8a7efd 11, 1 : BankEv$3@86d4c1 14, 1 : BankEv$4@f9f9d8 15, 1 : BankEv$5@820dda
|
|
|
|