Class Task

java.lang.Object
com.zenith.feature.tasks.Task
All Implemented Interfaces:
Closeable, AutoCloseable

@Experimental public class Task extends Object implements Closeable
A task that consists of an Action, a Condition, and a Continuation. The task executes the Action when the Condition is met. The Continuation decides when the task should stop executing.
  • Constructor Details

  • Method Details

    • tick

      public boolean tick()
      Returns:
      true if the task should continue executing, false otherwise
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getId

      public String getId()
    • getAction

      public Action getAction()
    • getCondition

      public Condition getCondition()
    • getContinuation

      public Continuation getContinuation()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object