Class AbstractTask<V>

java.lang.Object
com.google.common.util.concurrent.internal.InternalFutureFailureAccess
com.google.common.util.concurrent.AbstractFuture<V>
com.sk89q.worldedit.util.task.AbstractTask<V>
Type Parameters:
V - the type returned
All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<V>, ProgressObservable, Task<V>, Future<V>
Direct Known Subclasses:
FutureForwardingTask

public abstract class AbstractTask<V> extends com.google.common.util.concurrent.AbstractFuture<V> implements Task<V>
An abstract task that stores a name and owner.
  • Constructor Details

    • AbstractTask

      protected AbstractTask(String name, @Nullable Object owner)
      Create a new instance.
      Parameters:
      name - the name
      owner - the owner
  • Method Details

    • getUniqueId

      public UUID getUniqueId()
      Description copied from interface: Task
      Get the unique ID of this task.
      Specified by:
      getUniqueId in interface Task<V>
      Returns:
      this task's unique ID
    • getName

      public String getName()
      Description copied from interface: Task
      Get the name of the task so it can be printed to the user.
      Specified by:
      getName in interface Task<V>
      Returns:
      the name of the task
    • getOwner

      @Nullable public Object getOwner()
      Description copied from interface: Task
      Get the owner of the task.
      Specified by:
      getOwner in interface Task<V>
      Returns:
      an owner object, if one is known or valid, otherwise null
    • getCreationDate

      public Date getCreationDate()
      Description copied from interface: Task
      Get the time at which the task was created.
      Specified by:
      getCreationDate in interface Task<V>
      Returns:
      a date