Interface Task


public interface Task
The task generated by Scheduler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel the task
    static Task
    completed(boolean async, boolean repeating)
    Create a completed task
    boolean
    Check if the task is async
    boolean
    Check if the task is cancelled
    boolean
    Check if the task is repeating
  • Method Details

    • completed

      static Task completed(boolean async, boolean repeating)
      Create a completed task
      Parameters:
      async - whether the task is async
      repeating - whether the task is repeating
      Returns:
      the completed task
    • isCancelled

      boolean isCancelled()
      Check if the task is cancelled
      Returns:
      true if the task is cancelled
    • cancel

      void cancel()
      Cancel the task
    • isAsync

      boolean isAsync()
      Check if the task is async
      Returns:
      true if the task is async
    • isRepeating

      boolean isRepeating()
      Check if the task is repeating
      Returns:
      true if the task is repeating