cz.cuni.amis.pogamut.base.agent.navigation.impl
Class BasePathExecutorState

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutorState
All Implemented Interfaces:
IPathExecutorState

public class BasePathExecutorState
extends java.lang.Object
implements IPathExecutorState

Represents simple implementation of the IPathExecutorState containing just the state.

Do not instantiated your own objects - use preinstantiated objects (constants), e.g., BasePathExecutor#INSTANTIATED, etc. (The only exception is the PathExecutorState.SWITCHED_TO_ANOTHER_PATH_ELEMENT state where you always have to instantiate this class to reraise the same event again.)

Use getState(PathExecutorState) to translate PathExecutorState into BasePathExecutorState.


Field Summary
static BasePathExecutorState FOLLOW_PATH_CALLED
          Corresponds to the PathExecutorState.FOLLOW_PATH_CALLED state.
static BasePathExecutorState INSTANTIATED
          Corresponds to the PathExecutorState.INSTANTIATED state.
static BasePathExecutorState PATH_COMPUTATION_FAILED
          Corresponds to the PathExecutorState.PATH_COMPUTATION_FAILED state.
static BasePathExecutorState PATH_COMPUTED
          Corresponds to the PathExecutorState.PATH_COMPUTED state.
static BasePathExecutorState STOPPED
          Corresponds to the PathExecutorState.STOPPED state.
static BasePathExecutorState STUCK
          Corresponds to the PathExecutorState.STUCK state.
static BasePathExecutorState SWITCHED_TO_ANOTHER_PATH_ELEMENT
          Corresponds to the PathExecutorState.SWITCHED_TO_ANOTHER_PATH_ELEMENT state.
static BasePathExecutorState TARGET_REACHED
          Corresponds to the PathExecutorState.TARGET_REACHED state.
 
Constructor Summary
BasePathExecutorState(PathExecutorState state)
          Instantiated the path executor with the given state.
 
Method Summary
 PathExecutorState getState()
          Returns current high-level state of the IPathExecutor.
static BasePathExecutorState getState(PathExecutorState state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANTIATED

public static final BasePathExecutorState INSTANTIATED
Corresponds to the PathExecutorState.INSTANTIATED state.


FOLLOW_PATH_CALLED

public static final BasePathExecutorState FOLLOW_PATH_CALLED
Corresponds to the PathExecutorState.FOLLOW_PATH_CALLED state.


PATH_COMPUTED

public static final BasePathExecutorState PATH_COMPUTED
Corresponds to the PathExecutorState.PATH_COMPUTED state.


PATH_COMPUTATION_FAILED

public static final BasePathExecutorState PATH_COMPUTATION_FAILED
Corresponds to the PathExecutorState.PATH_COMPUTATION_FAILED state.


SWITCHED_TO_ANOTHER_PATH_ELEMENT

public static final BasePathExecutorState SWITCHED_TO_ANOTHER_PATH_ELEMENT
Corresponds to the PathExecutorState.SWITCHED_TO_ANOTHER_PATH_ELEMENT state.


TARGET_REACHED

public static final BasePathExecutorState TARGET_REACHED
Corresponds to the PathExecutorState.TARGET_REACHED state.


STUCK

public static final BasePathExecutorState STUCK
Corresponds to the PathExecutorState.STUCK state.


STOPPED

public static final BasePathExecutorState STOPPED
Corresponds to the PathExecutorState.STOPPED state.

Constructor Detail

BasePathExecutorState

public BasePathExecutorState(PathExecutorState state)
Instantiated the path executor with the given state.

This constructor is meant to be used only by BasePathExecutor descendants! If you want to use it, it is advised to use predefined constants. (The only exception is the PathExecutorState.SWITCHED_TO_ANOTHER_PATH_ELEMENT state.)

Parameters:
state -
Method Detail

getState

public static BasePathExecutorState getState(PathExecutorState state)

getState

public PathExecutorState getState()
Description copied from interface: IPathExecutorState
Returns current high-level state of the IPathExecutor.

Specified by:
getState in interface IPathExecutorState
Returns: