Package jsonvalues.console
Interface Program<O extends Json<?>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Oexec()Execute the programdefault Oexec(String promptMessage, Function<O,String> resultFn)Execute the program, printing out a message before and after executing.
-
-
-
Method Detail
-
exec
default O exec(String promptMessage, Function<O,String> resultFn) throws ExecutionException, InterruptedException
Execute the program, printing out a message before and after executing.- Parameters:
promptMessage- the message printed out before the executionresultFn- function that takes the result as a parameter and return the messages printed out after the execution- Returns:
- a Json
- Throws:
ExecutionException- if this future completed exceptionallyInterruptedException- if the current thread was interrupted
-
exec
O exec() throws ExecutionException, InterruptedException
Execute the program- Returns:
- a Json
- Throws:
ExecutionException- if this future completed exceptionallyInterruptedException- if the current thread was interrupted
-
-