Class Streams


  • public class Streams
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Streams()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.stream.Stream<T> stream​(java.lang.Iterable<T> iterable)
      Returns a sequential Stream of the contents of iterable, delegating to Collection.stream() if possible.
      static <T> java.util.stream.Stream<T> stream​(java.util.Iterator<T> iterator)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Streams

        public Streams()
    • Method Detail

      • stream

        public static <T> java.util.stream.Stream<T> stream​(java.lang.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> java.util.stream.Stream<T> stream​(java.util.Iterator<T> iterator)