Package edu.tufts.hrilab.action
Class EventSpec
java.lang.Object
edu.tufts.hrilab.action.EventSpec
- All Implemented Interfaces:
Serializable
An event specification is a description of a step (event) in an action script.
Some events are realized as actions, and other events are controls (e.g. if, while).
The EventSpec class is designed to parse the String that describes the step and
provide simple accessors to the command (or control) and the list of arguments.
This class is immutable.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEventSpec
(EventSpec.EventType eventType, String eventString) Deprecated.Build ACTION or GOAL EventSpec from Predicate representation (i.e., action(actor,args)). -
Method Summary
-
Constructor Details
-
EventSpec
Deprecated.Use the Builder or constructor that takes in a Predicate.- Parameters:
eventType
-eventString
-
-
EventSpec
Build ACTION or GOAL EventSpec from Predicate representation (i.e., action(actor,args)). TODO: generalize this method to work for non-ACTION types, using the same semantics that Goal expects.- Parameters:
eventPredicate
-
-
-
Method Details
-
getType
Get EventType.- Returns:
- type
-
getPredicateForm
-
getCommand
Get command.- Returns:
- command
-
getActor
-
getInputArgs
Get input arguments.- Returns:
- shallow copy of arguments
-
getReturnArgs
Get return arguments.- Returns:
- shallow copy of arguments
-
getAllArgs
Get all arguments. Input args followed by return args.- Returns:
- shallow copy of arguments
-
toString
-
equals
-
hashCode
public int hashCode()
-