Class ExecutableList<E extends Executable & Comparable & Serializable>

    • Constructor Detail

      • ExecutableList

        public ExecutableList()
        Creates a new ExecutableList with the default settings.
      • ExecutableList

        public ExecutableList​(int initialCapacity)
        Creates a new ExecutableList with the specified initialCapacity.
        Parameters:
        initialCapacity - The initial capacity for instantiating the internal List
      • ExecutableList

        public ExecutableList​(boolean requiresSorting)
      • ExecutableList

        public ExecutableList​(int initialCapacity,
                              boolean requiresSorting)
      • ExecutableList

        public ExecutableList​(ExecutableList.Sorter<E> sorter)
        Creates a new ExecutableList using the specified Sorter.
        Parameters:
        sorter - The Sorter to use; may be null
      • ExecutableList

        public ExecutableList​(int initialCapacity,
                              ExecutableList.Sorter<E> sorter)
        Creates a new ExecutableList with the specified initialCapacity and Sorter.
        Parameters:
        initialCapacity - The initial capacity for instantiating the internal List
        sorter - The Sorter to use; may be null
    • Method Detail

      • getQuerySpaces

        public Set<Serializable> getQuerySpaces()
        Lazily constructs the querySpaces affected by the actions in the list.
        Returns:
        the querySpaces affected by the actions in this list
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if the list is empty.
      • remove

        public E remove​(int index)
        Removes the entry at position index in the list.
        Parameters:
        index - The index of the element to remove
        Returns:
        the entry that was removed
      • clear

        public void clear()
        Clears the list of executions.
      • removeLastN

        public void removeLastN​(int n)
        Removes the last n entries from the list.
        Parameters:
        n - The number of elements to remove.
      • add

        public boolean add​(E executable)
        Add an Executable to this list.
        Parameters:
        executable - the executable to add to the list
        Returns:
        true if the object was added to the list
      • sort

        public void sort()
        Sorts the list using the natural ordering or using the Sorter if it's not null.
      • size

        public int size()
        Returns:
        the current size of the list
      • get

        public E get​(int index)
        Parameters:
        index - The index of the element to retrieve
        Returns:
        The element at specified index
      • afterDeserialize

        public void afterDeserialize​(SessionImplementor session)
        Allow the Executables to re-associate themselves with the Session after deserialization.
        Parameters:
        session - The session to which to associate the Executables