question: public void addEvent ( SimEvent newEvent ) { double eventTime = newEvent . eventTime ( ) ; if ( eventTime >= maxTime ) { list . add ( newEvent ) ; maxTime = eventTime ; return ; } ListIterator < SimEvent > iterator = list . listIterator ( ) ; SimEvent event ; while ( iterator . hasNext ( ) ) { event = iterator . next ( ) ; if ( event . eventTime ( ) > eventTime ) { iterator . previous ( ) ; iterator . add ( newEvent ) ; return ; } } list . add ( newEvent ) ; }
target:  Adds a new event to the queue. Adding a new event to the queue preserves the temporal order of the events.