Package pro.horde.os.cutils.value
Class Pause<T>
- java.lang.Object
-
- pro.horde.os.cutils.value.Pause<T>
-
- Type Parameters:
T- type.
public final class Pause<T> extends Object
Pause allows you to write a safe an idiomatic expression to pause an execution on the current execution thread.- Since:
- 7.0
- Author:
- Bobai Kato {https://github.com/B0BAI}
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Pause.Run<T>days()SetPause.Runtime unit toTimeUnit.DAYSbooleanequals(Object o)inthashCode()Pause.Run<T>hours()SetPause.Runtime unit toTimeUnit.HOURSPause.Run<T>microSeconds()SetPause.Runtime unit toTimeUnit.MICROSECONDSPause.Run<T>milliSeconds()SetPause.Runtime unit toTimeUnit.MILLISECONDSPause.Run<T>minute()SetPause.Runtime unit toTimeUnit.MINUTESPause.Run<T>nanoSeconds()SetPause.Runtime unit toTimeUnit.NANOSECONDSPause.Run<T>seconds()SetPause.Runtime unit toTimeUnit.SECONDSstatic <T> 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
public static <T> 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
Pausefor subsequent operations.
-
nanoSeconds
public Pause.Run<T> nanoSeconds()
SetPause.Runtime unit toTimeUnit.NANOSECONDS- Returns:
- instance of
Pause.Runof the set type T
-
microSeconds
public Pause.Run<T> microSeconds()
SetPause.Runtime unit toTimeUnit.MICROSECONDS- Returns:
- instance of
Pause.Runof the set type T
-
milliSeconds
public Pause.Run<T> milliSeconds()
SetPause.Runtime unit toTimeUnit.MILLISECONDS- Returns:
- instance of
Pause.Runof the set type T
-
seconds
public Pause.Run<T> seconds()
SetPause.Runtime unit toTimeUnit.SECONDS- Returns:
- instance of
Pause.Runof the set type T
-
minute
public Pause.Run<T> minute()
SetPause.Runtime unit toTimeUnit.MINUTES- Returns:
- instance of
Pause.Runof the set type T
-
hours
public Pause.Run<T> hours()
SetPause.Runtime unit toTimeUnit.HOURS- Returns:
- instance of
Pause.Runof the set type T
-
days
public Pause.Run<T> days()
SetPause.Runtime unit toTimeUnit.DAYS- Returns:
- instance of
Pause.Runof the set type T
-
-