Class Streams


  • public class Streams
    extends Object
    • Constructor Detail

      • Streams

        public Streams()
    • Method Detail

      • stream

        public static <T> Stream<T> stream​(Iterable<T> iterable)
        Returns a sequential Stream of the contents of iterable, delegating to Collection.stream() if possible.
        Type Parameters:
        T - the stream type
        Parameters:
        iterable - the iterable to built the stream from
        Returns:
        the stream built from the given Iterable
      • stream

        public static <T> Stream<T> stream​(Iterator<T> iterator)