Class ActionList

    • Constructor Detail

      • ActionList

        public ActionList()
    • Method Detail

      • clear

        public void clear()
        Clears this list of any elements it contains.
      • add

        public void add​(ISchedulableAction action)
        Adds the specified action.
        Parameters:
        action - the action to add
      • addNoSort

        public void addNoSort​(ISchedulableAction action)
        Adds the specified action without marking the list as dirty and needing to be sorted.
        Parameters:
        action - the action to add
      • addNoSort

        public void addNoSort​(int index,
                              ISchedulableAction action)
        Adds the specified action at the specifed index without marking the list as dirty and needing to be sorted.
        Parameters:
        action - the action to add
      • addAllNoSort

        public void addAllNoSort​(ActionList other)
        Adds all the elements in the other list to this one without marking this as dirty and needing to be sorted.
        Parameters:
        other - the list to add
      • remove

        public boolean remove​(ISchedulableAction action)
        Removes the specified action.
        Parameters:
        action -
        Returns:
        true if the action was removed, otherwise false.
      • size

        public int size()
        Gets the size of this list.
        Returns:
        the size of this list.
      • shuffle

        public void shuffle()
        Shuffles the elements of this list.
      • sort

        public void sort​(Comparator<ISchedulableAction> comp,
                         boolean force)
        Sorts this list using the specified Comparator.
        Parameters:
        comp -
        force - if true this will always sort regardless.
      • delete

        public void delete​(int n)
        Deletes the first N number of elements from this list.
        Parameters:
        n - the number of elements to delete.