public class Waiting extends Object
true.| Constructor and Description |
|---|
Waiting() |
| Modifier and Type | Method and Description |
|---|---|
static void |
waitFor(ExceptionBooleanSupplier checkSupplier,
long interval)
Waits until the given function returns
true while executing
repeatedly after the given amount of time. |
static void |
waitFor(ExceptionBooleanSupplier checkSupplier,
long interval,
long maxWaitingTime)
Waits until the given function returns
true while executing
repeatedly after the given amount of time or terminates with throwing an
InterruptedException when the given maximum waiting time has been
reached. |
public static void waitFor(ExceptionBooleanSupplier checkSupplier, long interval) throws Exception
true while executing
repeatedly after the given amount of time.checkSupplier - the function for which this method is waiting for to return
true.interval - the time interval in which the given function will be executed,
again (in ms).Exception - every exception that might be thrown by the given function.public static void waitFor(ExceptionBooleanSupplier checkSupplier, long interval, long maxWaitingTime) throws Exception
true while executing
repeatedly after the given amount of time or terminates with throwing an
InterruptedException when the given maximum waiting time has been
reached.checkSupplier - the function for which this method is waiting for to return
true.interval - the time interval in which the given function will be executed,
again (in ms).InterruptedException - if the given maximum waiting time has been reached.Exception - every exception that might be thrown by the given function.Copyright © 2017–2018. All rights reserved.