Modifier and Type | Method and Description |
---|---|
static Runnable |
onlyOnce(Runnable delegate)
Returns a
Runnable instance that will only run the specified runnable once. |
public static Runnable onlyOnce(Runnable delegate)
Runnable
instance that will only run the specified runnable once.
Subsequent invocation will return without running the specified runnable.delegate
- a runnable to run only once.Runnable
instance that run the specified runnable once, never null.