Class IOSpliteratorAdapter<T>

  • Type Parameters:
    T - the type of the stream elements.
    All Implemented Interfaces:
    IOSpliterator<T>

    final class IOSpliteratorAdapter<T>
    extends java.lang.Object
    implements IOSpliterator<T>
    Adapts an Spliterator as an IOSpliterator.
    • Field Detail

      • delegate

        private final java.util.Spliterator<T> delegate
    • Constructor Detail

      • IOSpliteratorAdapter

        IOSpliteratorAdapter​(java.util.Spliterator<T> delegate)
    • Method Detail

      • adapt

        static <E> IOSpliteratorAdapter<E> adapt​(java.util.Spliterator<E> delegate)
        Description copied from interface: IOSpliterator
        Adapts the given Spliterator as an IOSpliterator.
        Type Parameters:
        E - the type of the stream elements.
        Parameters:
        delegate - The iterator to adapt
        Returns:
        A new IOSpliterator
      • unwrap

        public java.util.Spliterator<T> unwrap()
        Description copied from interface: IOSpliterator
        Unwraps this instance and returns the underlying Spliterator.

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

        Specified by:
        unwrap in interface IOSpliterator<T>
        Returns:
        the underlying Spliterator.