Interface Dealer<T>

  • Type Parameters:
    T - the type of results supplied by this supplier.
    All Known Implementing Classes:
    Idler
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Dealer<T>
    Represents a dealer of results. UnLike Supplier and like Callable, deal() throw an Exception. Uses the Dealer instead of Supplier if an Exception will be thrown for the operation prior to the supplying of a result.

    There is no requirement that the Dealer will return distinct result when called.

    This is a functional interface whose functional method is deal().

    Since:
    1.0
    Author:
    , Bobai Kato
    See Also:
    Callable, Supplier
    • Method Detail

      • deal

        T deal()
        throws Exception
        Gets a result.
        Returns:
        a result
        Throws:
        Exception - operation exception thrown