|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.sposh.executor.PrintWorkExecutor
public class PrintWorkExecutor
Very simple executor for plans that will print name of primitive, that is supposed to execute, to specified stream.
There are two lists of primitives, one will always return true, other will always return false. Both will be printed. Primitives that are not in either of lists will cause exceptionIllegalArgumentException
.
Constructor Summary | |
---|---|
PrintWorkExecutor(String[] succeed,
String[] fail)
Create worker that will print name of primitives into System.out . |
|
PrintWorkExecutor(String[] succeed,
String[] fail,
PrintStream stream)
Create worker that will print name of primitives into specified stream. |
Method Summary | |
---|---|
void |
addPrimitives(String[] primitives,
Boolean value)
Add primitives to the map with specified return value. |
ActionResult |
executeAction(String primitive,
VariableContext ctx)
Execute action and get the result. |
Object |
executeSense(String primitive,
VariableContext ctx)
Execute sense and get the result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintWorkExecutor(String[] succeed, String[] fail, PrintStream stream)
succeed
- list of non-zero length strings with names of primitives returning truefail
- list of non-zero length strings with names of primitives returning falsestream
- stream to write into
IllegalArgumentException
- If some primitive is specified twice,public PrintWorkExecutor(String[] succeed, String[] fail)
System.out
.
Method Detail |
---|
public void addPrimitives(String[] primitives, Boolean value)
primitives
- list of primitives we want to add.value
- what value should all primitives return
IllegalArgumentException
- If some primitive is specified twice,public Object executeSense(String primitive, VariableContext ctx)
IWorkExecutor
executeSense
in interface IWorkExecutor
primitive
- name of primitivectx
- variable context for sense containing possible parameters
public ActionResult executeAction(String primitive, VariableContext ctx)
IWorkExecutor
executeAction
in interface IWorkExecutor
primitive
- name of primitivectx
- variable context for action containing possible parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |