Package art.cutils.value
Class Pause<T>
- java.lang.Object
-
- art.cutils.value.Pause<T>
-
- Type Parameters:
T
- type.
public final class Pause<T> extends Object
Pause helps you write a safe an idiomatic expression to pause an execution on the current execution thread.- Since:
- 1.0
- Author:
- Bobai Kato
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pause.Run<T>
days()
SetPause.Run
time unit toTimeUnit.DAYS
boolean
equals(Object o)
int
hashCode()
Pause.Run<T>
hours()
SetPause.Run
time unit toTimeUnit.HOURS
Pause.Run<T>
microSeconds()
SetPause.Run
time unit toTimeUnit.MICROSECONDS
Pause.Run<T>
milliSeconds()
SetPause.Run
time unit toTimeUnit.MILLISECONDS
Pause.Run<T>
minute()
SetPause.Run
time unit toTimeUnit.MINUTES
Pause.Run<T>
nanoSeconds()
SetPause.Run
time unit toTimeUnit.NANOSECONDS
Pause.Run<T>
seconds()
SetPause.Run
time unit toTimeUnit.SECONDS
static <T> @NotNull Pause<T>
until(int timeOut)
Until is used to set the timeout number, which will be interpreted into it's subsequent time equivalent
-
-
-
Method Detail
-
until
@Contract(value="_ -> new", pure=true) @NotNull public static <T> @NotNull Pause<T> until(int timeOut)
Until is used to set the timeout number, which will be interpreted into it's subsequent time equivalent- Type Parameters:
T
- the type of the operation- Parameters:
timeOut
- Number to be interpreted to time- Returns:
- an instance of
Pause
for subsequent operations.
-
nanoSeconds
public Pause.Run<T> nanoSeconds()
SetPause.Run
time unit toTimeUnit.NANOSECONDS
- Returns:
- instance of
Pause.Run
of the set type T
-
microSeconds
public Pause.Run<T> microSeconds()
SetPause.Run
time unit toTimeUnit.MICROSECONDS
- Returns:
- instance of
Pause.Run
of the set type T
-
milliSeconds
public Pause.Run<T> milliSeconds()
SetPause.Run
time unit toTimeUnit.MILLISECONDS
- Returns:
- instance of
Pause.Run
of the set type T
-
seconds
public Pause.Run<T> seconds()
SetPause.Run
time unit toTimeUnit.SECONDS
- Returns:
- instance of
Pause.Run
of the set type T
-
minute
public Pause.Run<T> minute()
SetPause.Run
time unit toTimeUnit.MINUTES
- Returns:
- instance of
Pause.Run
of the set type T
-
hours
public Pause.Run<T> hours()
SetPause.Run
time unit toTimeUnit.HOURS
- Returns:
- instance of
Pause.Run
of the set type T
-
days
public Pause.Run<T> days()
SetPause.Run
time unit toTimeUnit.DAYS
- Returns:
- instance of
Pause.Run
of the set type T
-
-