Package pro.horde.os.cutils.value
Class Que<T>
- java.lang.Object
-
- pro.horde.os.cutils.value.Que<T>
-
- Type Parameters:
T- type.
- All Implemented Interfaces:
Serializable
public final class Que<T> extends Object implements Serializable
This isQuegotten from the word Cue. This is intended to give you the ability to orchestrate operation while also, signalling precise action(s) and flow with full read(ability).- Since:
- 1.0
- Author:
- Bobai Kato
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Que<T>andAccept(Accepter<? super T> accepter)This method will accept naAcceptertype variable.Que<T>andCall(Callable<? extends T> callable)This method will executeCallabletype variable.Que<T>andConsume(Consumer<? super T> consumer)This method will consume aConsumertype variable.Que<T>andDeal(Dealer<? extends T> dealer)This method will deal datavaluevariable.Que<T>andExecute(Executable executable)Use when Operation will throw an exception.Que<T>andRun(Runnable runnable)This method will execute aRunnabletype variable.Que<T>andSupply(Supplier<? extends T> supplier)This method will supply datavaluevariable.static <T> Que<T>as(Dealer<? extends T> dealer)CompletableFuture<T>completableFuture()Used to get current value ofCompletableFuturetype.booleanequals(Object o)Que<T>execute(Accepter<? super T> accepter)This method will Accept and executeAcceptertype variable.static <T> Que<T>execute(Executable executable)This method will run aExecutableinstance Use when Operation will throw an exception.Tget()Used to get the current set value.inthashCode()static <T> Que<T>of(Supplier<? extends T> supplier)static <T> Que<T>of(T value)This method will setvalueand returns instance ofQuefor other sequential Operations.Optional<T>optional()Used to get current value ofOptionaltype.static <T> Que<T>run(Runnable runnable)This method will run aRunnableinstance.Que<T>run(Consumer<? super T> consumer)This method will consume executeConsumertype variable.
-
-
-
Method Detail
-
of
public static <T> Que<T> of(T value)
This method will setvalueand returns instance ofQuefor other sequential Operations.
-
of
public static <T> Que<T> of(Supplier<? extends T> supplier)
This method will take aSupplierof Type t and will setvalueand returns instance ofQuefor other sequential Operations.- Type Parameters:
T- Type of value- Parameters:
supplier- variable of Type value- Returns:
- instance of
Que
-
run
public Que<T> run(Consumer<? super T> consumer)
This method will consume executeConsumertype variable.
-
execute
public static <T> Que<T> execute(Executable executable) throws Exception
This method will run aExecutableinstance Use when Operation will throw an exception.
-
execute
public Que<T> execute(Accepter<? super T> accepter) throws Exception
This method will Accept and executeAcceptertype variable.
-
andExecute
public Que<T> andExecute(Executable executable) throws Exception
Use when Operation will throw an exception.- Parameters:
executable-Executabletype variable- Returns:
- existing instance of
Que - Throws:
Exception- instance of any exception thrown.- Since:
- 1.0
-
andSupply
public Que<T> andSupply(Supplier<? extends T> supplier)
This method will supply datavaluevariable.
-
andConsume
public Que<T> andConsume(Consumer<? super T> consumer)
This method will consume aConsumertype variable.
-
andCall
public Que<T> andCall(Callable<? extends T> callable) throws Exception
This method will executeCallabletype variable.
-
completableFuture
public CompletableFuture<T> completableFuture()
Used to get current value ofCompletableFuturetype.- Returns:
CompletableFutureofvalue- Since:
- 1.0
-
-