public final class PandaInterpretation extends Object implements Interpretation
| Constructor and Description |
|---|
PandaInterpretation(Interpreter interpreter) |
| Modifier and Type | Method and Description |
|---|---|
<E extends Exception> |
execute(org.panda_lang.utilities.commons.function.ThrowingRunnable<E> task)
Execute the given task
|
<T,E extends Exception> |
execute(org.panda_lang.utilities.commons.function.ThrowingSupplier<T,E> task)
Execute the given task and get result
|
Collection<? extends Exception> |
getFailures()
Get all collected failures
|
Interpreter |
getInterpreter()
Get associated interpreter
|
boolean |
isHealthy()
Check if process of interpretation is still healthy (executed tasks didn't throw any exceptions)
|
public PandaInterpretation(Interpreter interpreter)
public <E extends Exception> Interpretation execute(org.panda_lang.utilities.commons.function.ThrowingRunnable<E> task)
Interpretationexecute in interface InterpretationE - exception typetask - the task to execute@Nullable public <T,E extends Exception> T execute(org.panda_lang.utilities.commons.function.ThrowingSupplier<T,E> task)
Interpretationexecute in interface InterpretationT - type of resultE - exception typetask - the task to executepublic boolean isHealthy()
InterpretationisHealthy in interface Interpretationpublic Collection<? extends Exception> getFailures()
InterpretationgetFailures in interface Interpretationpublic Interpreter getInterpreter()
InterpretationgetInterpreter in interface InterpretationCopyright © 2020. All rights reserved.