Class GScheduledTask

  • All Implemented Interfaces:
    java.lang.Comparable<GScheduledTask>

    public class GScheduledTask
    extends java.lang.Object
    implements java.lang.Comparable<GScheduledTask>
    Class for tracking scheduled GTasks. When tasks are scheduled, they are assigned to a GTaskGroup, given a priority, assigned a one-up ID, given a GTaskMonitor. This class is used to keep all that information together.

    • Constructor Detail

      • GScheduledTask

        public GScheduledTask​(GTaskGroup group,
                              GTask task,
                              int priority)
        Create a new GScheduledTask when a task is scheduled with the GTaskManager.
        Parameters:
        group - the group that this task belongs to.
        task - the task being scheduled.
        priority - the priority at which this task is to be executed relative to other scheduled tasks. Lower numbers are run before higher numbers.
    • Method Detail

      • getTask

        public GTask getTask()
        Returns the GTask that is scheduled.
        Returns:
        the GTask that is scheduled.
      • getPriority

        public int getPriority()
        Returns the priority at which the task was scheduled. Lower numbers have higher priority.
        Returns:
        the priority at which the task was scheduled.
      • getTaskMonitor

        public GTaskMonitor getTaskMonitor()
        Returns the GTaskMonitor that will be used for this task.
        Returns:
        the GTaskMonitor that will be used for this task.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getGroup

        public GTaskGroup getGroup()
        Return GTaskGroup for this task.
        Returns:
        the GTaskGroup
      • getDescription

        public java.lang.String getDescription()
        Returns the description for the scheduled GTask.
        Returns:
        the description for the scheduled GTask.