public interface AutoClosingStream<T> extends Stream<T>
Stream.Builder<T>
Modifier and Type | Method and Description |
---|---|
static <T> Stream<T> |
of(Stream<T> stream)
Creates an returns a new Stream that automatically will invoke its
BaseStream.close() method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream . |
static <T> Stream<T> |
of(Stream<T> stream,
boolean allowStreamIteratorAndSpliterator)
Creates an returns a new Stream that automatically will invoke its
BaseStream.close() method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream . |
allMatch, anyMatch, builder, collect, collect, concat, count, distinct, empty, filter, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, generate, iterate, limit, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, peek, reduce, reduce, reduce, skip, sorted, sorted, toArray, toArray
close, isParallel, iterator, onClose, parallel, sequential, spliterator, unordered
static <T> Stream<T> of(Stream<T> stream)
BaseStream.close()
method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream
.of
in interface Stream<T>
T
- Stream typestream
- to wrapBaseStream.close()
method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream
NullPointerException
- if the provided stream
is null
static <T> Stream<T> of(Stream<T> stream, boolean allowStreamIteratorAndSpliterator)
BaseStream.close()
method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream
.T
- Stream typestream
- to wrapallowStreamIteratorAndSpliterator
- if the methods BaseStream.iterator()
and
BaseStream.spliterator()
are allowed.BaseStream.close()
method
whenever a terminating operation is invoked and where the stream elements are obtained from the given
stream
NullPointerException
- if the provided stream
is null
Copyright © 2019 Speedment, Inc.. All rights reserved.