List of utility methods to do Stream of
Stream | stream(Object values) stream if (values == null) return Stream.empty(); if (values instanceof Collection) return ((Collection) values).stream(); if (values instanceof Object[]) return Stream.of(((Object[]) values)); if (values instanceof Iterable) { Spliterator<Object> spliterator = ((Iterable) values).spliterator(); ... |
boolean | streamEquals(Stream stream Equals if (a == null && b == null) { return true; if (a == null || b == null) { return false; final Iterator<T> iterA = a.iterator(); final Iterator<T> iterB = b.iterator(); ... |
IntStream | streamInt(int max) stream Int return streamInt(0, 1, max);
|
Stream | streamOf(final Iterable extends T> iterable) Wrap an iterable in a stream return streamOf(iterable.iterator());
|
Stream | streamOf(Iterable stream Of return StreamSupport.stream(it.spliterator(), false);
|
Stream | streamOf(Iterable stream Of return StreamSupport.stream(iterable.spliterator(), false);
|
Stream | streamof(Iterable streamof return streamof(vals, false);
|
Stream | streamOf(T value) Stream or value or empty stream if value is null. return Optional.ofNullable(value).map(Stream::of).orElseGet(Stream::empty);
|
Stream | streamOfEnumeration(Enumeration convert Enumeration to the Stream return StreamSupport.stream(Spliterators.spliteratorUnknownSize(new Iterator<E>() { public E next() { return e.nextElement(); public boolean hasNext() { return e.hasMoreElements(); }, Spliterator.ORDERED), parallel); ... |
Stream | streamOfOptional(Optional stream Of Optional return Stream.of(element.orElse(null)).filter(e -> e != null);
|