java.lang.Object
org.autogui.swing.GuiSwingTaskRunner.ContextTaskResult<RetType>
- Type Parameters:
RetType- the type of the value
- Direct Known Subclasses:
GuiSwingTaskRunner.ContextTaskResultFail,GuiSwingTaskRunner.ContextTaskResultFailException,GuiSwingTaskRunner.ContextTaskResultWithDelay
- Enclosing class:
GuiSwingTaskRunner
the returned value for successfully obtaining a value
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteIfPresent(Consumer<RetType> task) executes the task with it's obtained value (both immediate and delayed cases)voidexecutes the task if delayed (nothing happen with the class)getValue()getValueOr(RetType cancelValue, RetType timeoutValue) booleanisCancel()booleanisError()booleanbooleanbooleantoString()
-
Field Details
-
value
-
-
Constructor Details
-
ContextTaskResult
-
-
Method Details
-
getValue
-
isCancel
public boolean isCancel() -
isTimeout
public boolean isTimeout() -
isPresentedWithDelay
public boolean isPresentedWithDelay() -
isError
public boolean isError()- Returns:
- true if the value is an error
- Since:
- 1.6.1
-
isPresented
public boolean isPresented()- Returns:
- true if no-cancellation, no-timeout, immediately returned
-
executeIfPresent
executes the task with it's obtained value (both immediate and delayed cases)- Parameters:
task- to be executed with the value
-
executeIfPresentWithDelay
executes the task if delayed (nothing happen with the class)- Parameters:
task- to be executed with the value
-
getValueOr
-
toString
-