Interface EventQueue

  • All Known Implementing Classes:
    EventHeap

    public interface EventQueue
    Public interface of event queue implementations.
    • Method Detail

      • insert

        void insert​(SimEvent e)
        Insert an event in the queue.
      • extract

        SimEvent extract()
        Extract the (chronologically) next event from the queue.
      • remove

        boolean remove​(SimEvent element)
        Removes the given element from the queue.
        Parameters:
        element - the element to remove (mustn't be null)
        Returns:
        true if the element was contained in the heap and successfully removed, false otherwise
      • size

        int size()
        Returns the number of events currently contained in the event queue.
      • allEvents

        List<SimEvent> allEvents()
        Returns all events as an ordered list. Use carefully, this is an expensive operation.
        Returns:
        All events.