cz.cuni.amis.pogamut.base.agent.navigation
Enum PathExecutorState

java.lang.Object
  extended by java.lang.Enum<PathExecutorState>
      extended by cz.cuni.amis.pogamut.base.agent.navigation.PathExecutorState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PathExecutorState>

public enum PathExecutorState
extends java.lang.Enum<PathExecutorState>

High-level description of the IPathExecutor state.

IPathExecutor initial state is INSTANTIATED.

Read javadocs for respective states to get the picture how the IPathExecutor works.

Note that the most important outcome of state & transition definitions is that the IPathExecutor must switch itself to state STOPPED before it may switch into FOLLOW_PATH_CALLED again.


Enum Constant Summary
FOLLOW_PATH_CALLED
          IPathExecutor.followPath(IPathFuture) has been just called.
INSTANTIATED
          The IPathExecutor has been just instantiated and neither IPathExecutor.followPath(IPathFuture) nor IPathExecutor.stop() methods has been called since than.
PATH_COMPUTATION_FAILED
          IPathFuture has failed to provide a path.
PATH_COMPUTED
          IPathFuture has returned a path.
STOPPED
          The IPathExecutor.stop() has been called and no IPathExecutor.followPath(IPathFuture) has been called since that.
STUCK
          One of the IStuckDetector has signalized that the agent is unable to reach its destination (navigate along the path for whatever reason).
SWITCHED_TO_ANOTHER_PATH_ELEMENT
          IPathExecutor has switched to another path element (begun to navigate to another path element)
TARGET_REACHED
          IPathExecutor has successfully navigated the agent along the path.
 
Method Summary
static PathExecutorState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PathExecutorState[] 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

INSTANTIATED

public static final PathExecutorState INSTANTIATED
The IPathExecutor has been just instantiated and neither IPathExecutor.followPath(IPathFuture) nor IPathExecutor.stop() methods has been called since than.

Initial state of the IPathExecutor.

Next state may (only) be:


FOLLOW_PATH_CALLED

public static final PathExecutorState FOLLOW_PATH_CALLED
IPathExecutor.followPath(IPathFuture) has been just called.

Next state may (only) be:


PATH_COMPUTED

public static final PathExecutorState PATH_COMPUTED
IPathFuture has returned a path. This state marks the beginning of the agent's navigation through the environment according to the path.

Next state may (only) be:


PATH_COMPUTATION_FAILED

public static final PathExecutorState PATH_COMPUTATION_FAILED
IPathFuture has failed to provide a path.

Next state may (only) be:


SWITCHED_TO_ANOTHER_PATH_ELEMENT

public static final PathExecutorState SWITCHED_TO_ANOTHER_PATH_ELEMENT
IPathExecutor has switched to another path element (begun to navigate to another path element)

Next state may (only) be:


TARGET_REACHED

public static final PathExecutorState TARGET_REACHED
IPathExecutor has successfully navigated the agent along the path. Path target has been reached.

Next state may (only) be:


STUCK

public static final PathExecutorState STUCK
One of the IStuckDetector has signalized that the agent is unable to reach its destination (navigate along the path for whatever reason). The IPathExecutor halted.

Next state may (only) be:


STOPPED

public static final PathExecutorState STOPPED
The IPathExecutor.stop() has been called and no IPathExecutor.followPath(IPathFuture) has been called since that.

Next state may (only) be:

Method Detail

values

public static PathExecutorState[] 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 (PathExecutorState c : PathExecutorState.values())
    System.out.println(c);

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

valueOf

public static PathExecutorState valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null