public final class RunOnce
extends java.lang.Object
| Constructor and Description |
|---|
RunOnce() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
invoke(Action0 action)
Invoke the given action only if this RunOnce has not invoked
anything before.
|
<T> boolean |
invoke(Action1<? super T> action,
T parameter)
Invoke the given action only if this RunOnce has not invoked
anything before.
|
public boolean invoke(Action0 action)
action - the action to invokepublic <T> boolean invoke(Action1<? super T> action, T parameter)
T - the parameter typeaction - the action to invokeparameter - the parameter to use when invoking the action.