T- the type the observed
public class ExecuteOnceWhen<T> extends Object
ObservableValue's value fulfills a certain condition.
This class guarantees that regardless of the way different threads interact with the
action will be executed...
executeWhen()returns passes the condition
executeWhen()or after it returns)
executeWhen()) or one of several which were set by those threads.
ExecuteWhen to build an instance of this class.
|Modifier and Type||Method and Description|
Cancels the future execution of the action.
Executes the action (once) when the observable's value passes the condition.
public void executeWhen() throws IllegalStateException
This is a one way function that must only be called once. Calling it again throws an
cancel() to prevent future execution.
IllegalStateException- if this method is called more than once
public void cancel()
executeWhen()was not yet called or the action was already executed, this is a no-op.
This documentation is licensed under CC-BY 4.0, attributed to Nicolai Parlog from CodeFX.