Package org.bsc.async

Class AsyncGenerator.WithResult<E>

  • Type Parameters:
    E - the type of elements in the generator
    All Implemented Interfaces:
    Iterable<E>, AsyncGenerator<E>
    Enclosing interface:
    AsyncGenerator<E>

    public static class AsyncGenerator.WithResult<E>
    extends Object
    implements AsyncGenerator<E>
    An asynchronous generator decorator that allows retrieving the result value of the asynchronous operation, if any.
    • Method Detail

      • resultValue

        public Optional<Object> resultValue()
        Retrieves the result value of the generator, if any.
        Returns:
        an Optional containing the result value if present, or an empty Optional if not