public class Streams
extends java.lang.Object
Constructor and Description |
---|
Streams() |
Modifier and Type | Method and 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) |
public static <T> java.util.stream.Stream<T> stream(java.lang.Iterable<T> iterable)
Stream
of the contents of iterable
, delegating to Collection.stream()
if possible.T
- the stream typeiterable
- the iterable to built the stream fromIterable
public static <T> java.util.stream.Stream<T> stream(java.util.Iterator<T> iterator)