Class Streams


  • public abstract class Streams
    extends Object
    Utility class containing some stream helper functions.
    Author:
    John Grimes
    • Constructor Detail

      • Streams

        public Streams()
    • Method Detail

      • streamOf

        @Nonnull
        public static <T> Stream<T> streamOf​(@Nonnull
                                             Iterator<T> iterator)
        Creates a stream from the iterator.
        Type Parameters:
        T - the type (of elements)
        Parameters:
        iterator - an iterator
        Returns:
        the stream for given iterator