Class TableModelEventList<T extends Number & Comparable<T>>

java.lang.Object
nl.tudelft.simulation.dsol.eventlists.RedBlackTree<T>
nl.tudelft.simulation.dsol.eventlists.TableModelEventList<T>
Type Parameters:
T - the type of simulation time, e.g. SimTimeCalendarLong or Double or DoubleUnit.
All Implemented Interfaces:
Serializable, Iterable<SimEventInterface<T>>, EventListInterface<T>

public class TableModelEventList<T extends Number & Comparable<T>> extends RedBlackTree<T>
A TableModel implementation of an eventlist is an extionsion of the eventlist which upholds its own TableModel. This implementation is used to graphically display the events in the tree.

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Since:
1.5
Author:
Peter Jacobs
See Also:
  • Field Details

    • EVENTLIST_CHANCED_EVENT

      public static final org.djutils.event.EventType EVENTLIST_CHANCED_EVENT
      The EVENTLIST_CHANGED_EVENT.
  • Constructor Details

    • TableModelEventList

      public TableModelEventList(EventListInterface<T> origin)
      constructs a new TableModelEventList.
      Parameters:
      origin - EventListInterface<T>; the origin
  • Method Details

    • getTableModel

      public TableModel getTableModel()
      returns the tableModel.
      Returns:
      TableModel result
    • setShowPackage

      public void setShowPackage(boolean showPackage)
      sets the showPackage.
      Parameters:
      showPackage - boolean; The showPackage to set.
    • addAll

      public void addAll(Collection<? extends SimEventInterface<T>> collection)
      Add all events in the collection to the ventlist.
      Parameters:
      collection - events
    • clear

      public void clear()
      Clear the event list.
      Specified by:
      clear in interface EventListInterface<T extends Number & Comparable<T>>
      Overrides:
      clear in class RedBlackTree<T extends Number & Comparable<T>>
    • removeFirst

      public SimEventInterface<T> removeFirst()
      Returns and removes the first event (lowest time / priority) of the event list. The method returns null when the event list is empty.
      Specified by:
      removeFirst in interface EventListInterface<T extends Number & Comparable<T>>
      Overrides:
      removeFirst in class RedBlackTree<T extends Number & Comparable<T>>
      Returns:
      SimEventInterface<T>; the first element in this event list before removal, or null when the list is empty