Interface InputSource<I>

Type Parameters:
I - the type of each input element
All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BufferedInputSource

public interface InputSource<I> extends AutoCloseable
A blocking pull source of inputs for a bidirectional action.

The consumer calls next() repeatedly to obtain successive inputs. When the stream is exhausted, next() returns Optional.empty(). After that, every subsequent call also returns empty. The close() method releases any resources held by this source.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases any resources held by this source.
    Blocks until the next input is available or the stream ends.
  • Method Details