com.kuka.task
Enum TaskState

java.lang.Object
  extended by java.lang.Enum<TaskState>
      extended by com.kuka.task.TaskState
All Implemented Interfaces:
Serializable, Comparable<TaskState>

public enum TaskState
extends Enum<TaskState>

Represents the state of a task instance.


Enum Constant Summary
CREATING
          Task instance is being created (constructor of the main class implementing IRoboticsAPITask is called).
DISPOSING
          Task is being disposed.
ERROR
          Task has stopped with an error.
INITIAL
          Task is ready to be created.
INITIALIZING
          Task is initializing.
RUNNING
          Task is running.
STOPPED
          Task has stopped without any error.
STOPPING
          Task is stopping.
 
Method Summary
 boolean isActive()
          Indicates whether the task state is an active state.
 boolean isFinished()
          Indicates whether the task state is a finished state (STOPPED or ERROR).
 boolean isStartable()
          Indicates whether a task instance is startable in this state.
 boolean isStopping()
          Indicates whether the task state is a stopping state.
static TaskState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TaskState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INITIAL

public static final TaskState INITIAL
Task is ready to be created. This is the first state a task gets.


CREATING

public static final TaskState CREATING
Task instance is being created (constructor of the main class implementing IRoboticsAPITask is called).


INITIALIZING

public static final TaskState INITIALIZING
Task is initializing. (IRoboticsAPITask.initialize() is called).


RUNNING

public static final TaskState RUNNING
Task is running. (IRoboticsAPITask.run() is called).


DISPOSING

public static final TaskState DISPOSING
Task is being disposed. (IRoboticsAPITask.dispose() is called).


STOPPING

public static final TaskState STOPPING
Task is stopping. Cleanup after dispose will be performed here.


STOPPED

public static final TaskState STOPPED
Task has stopped without any error.


ERROR

public static final TaskState ERROR
Task has stopped with an error.

Method Detail

values

public static TaskState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TaskState c : TaskState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TaskState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

isActive

public boolean isActive()
Indicates whether the task state is an active state.

Returns:
true if the task state is active; otherwise false.

isStartable

public boolean isStartable()
Indicates whether a task instance is startable in this state.

Returns:
true if this is a startable state; otherwise false.

isFinished

public boolean isFinished()
Indicates whether the task state is a finished state (STOPPED or ERROR).

Returns:
true if this is a finished state; otherwise false.

isStopping

public boolean isStopping()
Indicates whether the task state is a stopping state.

A task is considered to be in a stopping state while in DISPOSING or STOPPING.

Returns:
true if this is a stopping state; otherwise false.


Copyright © 2019. All rights reserved.