Class IOBaseStreamAdapter<T,​S extends IOBaseStream<T,​S,​B>,​B extends java.util.stream.BaseStream<T,​B>>

  • Type Parameters:
    T - the type of the stream elements.
    S - the type of the stream extending IOBaseStream.
    All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IOBaseStream<T,​S,​B>
    Direct Known Subclasses:
    IOStreamAdapter

    abstract class IOBaseStreamAdapter<T,​S extends IOBaseStream<T,​S,​B>,​B extends java.util.stream.BaseStream<T,​B>>
    extends java.lang.Object
    implements IOBaseStream<T,​S,​B>
    Abstracts an IOBaseStream implementation. Keep package-private for now.
    • Field Detail

      • delegate

        private final B extends java.util.stream.BaseStream<T,​B> delegate
        The underlying base stream.
    • Constructor Detail

      • IOBaseStreamAdapter

        IOBaseStreamAdapter​(B delegate)
        Constructs an instance.
        Parameters:
        delegate - the delegate.
    • Method Detail

      • unwrap

        public B unwrap()
        Description copied from interface: IOBaseStream
        Unwraps this instance and returns the underlying Stream.

        Implementations may not have anything to unwrap and that behavior is undefined for now.

        Specified by:
        unwrap in interface IOBaseStream<T,​S extends IOBaseStream<T,​S,​B>,​B extends java.util.stream.BaseStream<T,​B>>
        Returns:
        the underlying stream.