cz.cuni.amis.pogamut.sposh.executor
Enum ActionResult

Package class diagram package ActionResult
java.lang.Object
  extended by java.lang.Enum<ActionResult>
      extended by cz.cuni.amis.pogamut.sposh.executor.ActionResult
All Implemented Interfaces:
Serializable, Comparable<ActionResult>

public enum ActionResult
extends Enum<ActionResult>

The value returned by the primitive via IWorkExecutor that can modify the behavior of posh stack evaluation.

Author:
Jimmy

Enum Constant Summary
FAILED
          Indicated failure of the action.
FINISHED
          Indicates that the action has finished and PoshEngine may search for another action to execute.
RUNNING
          Indicates that action is running within the environment and needs time to finish its execution.
RUNNING_ONCE
          Indicates that action is running within the environment BUT it wants to be running for only ONE cycle.
 
Method Summary
static ActionResult valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ActionResult[] 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

FAILED

public static final ActionResult FAILED
Indicated failure of the action.

Failing an action means to roll back intention-stack of the drive down to the last adapt (no adapt == delete the stack).

Note that StateWorkExecutor won't stop PoshEngine execution upon this result.


RUNNING

public static final ActionResult RUNNING
Indicates that action is running within the environment and needs time to finish its execution.

PoshEngine won't delete the action from the stack and will wait for its full execution.

Note that StateWorkExecutor will execute PoshEngine cycles until it hits some RUNNING/RUNNING_ONCE action.


RUNNING_ONCE

public static final ActionResult RUNNING_ONCE
Indicates that action is running within the environment BUT it wants to be running for only ONE cycle.

PoshEngine will delete the action from the stack and terminates with SURFACE.

Note that StateWorkExecutor will execute PoshEngine cycles until it hits some RUNNING/RUNNING_ONCE action.


FINISHED

public static final ActionResult FINISHED
Indicates that the action has finished and PoshEngine may search for another action to execute.

Note that StateWorkExecutor will continue running PoshEngine after FINISHING some action (until some RUNNING/RUNNING_ONCE action is executed).

Method Detail

values

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

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

valueOf

public static ActionResult 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


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.