Class Que<T>

  • Type Parameters:
    T - type.
    All Implemented Interfaces:
    Serializable

    public final class Que<T>
    extends Object
    implements Serializable
    This is Que gotten 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 Detail

      • of

        @Contract(value="_ -> new",
                  pure=true)
        @NotNull
        public static <T> @NotNull Que<T> of​(T value)
        This method will set value and returns instance of Que for other sequential Operations.
        Type Parameters:
        T - value Type
        Parameters:
        value - Que value
        Returns:
        Returns instance of Que
      • of

        @Contract("_ -> new")
        @NotNull
        public static <T> @NotNull Que<T> of​(@NotNull
                                             @NotNull Supplier<? extends T> supplier)
        This method will take a Supplier of Type t and will set value and returns instance of Que for other sequential Operations.
        Type Parameters:
        T - Type of value
        Parameters:
        supplier - variable of Type value
        Returns:
        instance of Que
      • as

        @NotNull
        public static <T> @NotNull Que<T> as​(Dealer<? extends T> dealer)
                                      throws Exception
        This method will take a Dealer of Type t and will set value and returns instance of Que for other sequential Operations.
        Type Parameters:
        T - Type of value
        Parameters:
        dealer - variable of Type value
        Returns:
        instance of Que
        Throws:
        Exception
      • run

        @NotNull
        public static <T> @NotNull Que<T> run​(Runnable runnable)
        This method will run a Runnable instance.
        Type Parameters:
        T - Type of value
        Parameters:
        runnable - Runnable type variable
        Returns:
        returns new instance of Que
        Since:
        1.0
      • execute

        @NotNull
        public static <T> @NotNull Que<T> execute​(Executable executable)
                                           throws Exception
        This method will run a Executable instance Use when Operation will throw an exception.
        Type Parameters:
        T - Type of value
        Parameters:
        executable - Runnable type variable
        Returns:
        returns new instance of Que
        Throws:
        Exception - this can be any exception throw when executing
        Since:
        1.0
      • run

        @Contract("_ -> this")
        public Que<T> run​(Consumer<? super T> consumer)
        This method will consume execute Consumer type variable.
        Parameters:
        consumer - Consumer type variable.
        Returns:
        existing instance of the Que
        Since:
        1.0
      • execute

        @Contract("_ -> this")
        public Que<T> execute​(Accepter<? super T> accepter)
                       throws Exception
        This method will Accept and execute Accepter type variable.
        Parameters:
        accepter - Accepter type variable.
        Returns:
        existing instance of the Que
        Throws:
        Exception
        Since:
        1.0
      • andRun

        @Contract("_ -> this")
        public Que<T> andRun​(Runnable runnable)
        This method will execute a Runnable type variable.
        Parameters:
        runnable - Runnable type variable
        Returns:
        existing instance of Que
        Since:
        1.0
      • andExecute

        @Contract("_ -> this")
        public Que<T> andExecute​(Executable executable)
                          throws Exception
        Use when Operation will throw an exception.
        Parameters:
        executable - Executable type variable
        Returns:
        existing instance of Que
        Throws:
        Exception - instance of any exception thrown.
        Since:
        1.0
      • andSupply

        @Contract("_ -> this")
        @NotNull
        public @NotNull Que<T> andSupply​(Supplier<? extends T> supplier)
        This method will supply data value variable.
        Parameters:
        supplier - Supplier variable
        Returns:
        existing instance of Que
        Since:
        1.0
      • andDeal

        @Contract("_ -> this")
        @NotNull
        public @NotNull Que<T> andDeal​(Dealer<? extends T> dealer)
                                throws Exception
        This method will deal data value variable. Use this method in place of Supplier if operation will throw an Exception.
        Parameters:
        dealer - Dealer variable
        Returns:
        existing instance of Que
        Throws:
        Exception
        Since:
        1.0
      • andConsume

        @Contract("_ -> this")
        public Que<T> andConsume​(Consumer<? super T> consumer)
        This method will consume a Consumer type variable.
        Parameters:
        consumer - Consumer type variable
        Returns:
        existing instance of Que
        Since:
        1.0
      • andAccept

        @Contract("_ -> this")
        public Que<T> andAccept​(Accepter<? super T> accepter)
                         throws Exception
        This method will accept na Accepter type variable. Use when operation will/may throw and Exception
        Parameters:
        accepter - Consumer type variable
        Returns:
        existing instance of Que
        Throws:
        Exception
        Since:
        1.0
      • andCall

        @NotNull
        public @NotNull Que<T> andCall​(Callable<? extends T> callable)
                                throws Exception
        This method will execute Callable type variable.
        Parameters:
        callable - Callable type variable.
        Returns:
        the result type of method call
        Throws:
        Exception - instance of any exception thrown.
        Since:
        1.0
      • get

        @Contract(pure=true)
        public T get()
        Used to get the current set value.
        Returns:
        value
        Since:
        1.0
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object