Class IOSpliteratorAdapter<T>

java.lang.Object
org.apache.commons.io.function.IOSpliteratorAdapter<T>
Type Parameters:
T - the type of the stream elements.
All Implemented Interfaces:
IOSpliterator<T>

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

  • Constructor Details

    • IOSpliteratorAdapter

      IOSpliteratorAdapter(Spliterator<T> delegate)
  • Method Details

    • adapt

      static <E> IOSpliteratorAdapter<E> adapt(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 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.