-
Method Summary
Modifier and TypeMethodDescriptioncreateAutoCloseDoubleStream(DoubleStream doubleStream) Creates and returns a new wrapped DoubleStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.createAutoCloseIntStream(IntStream intStream) Creates and returns a new wrapped IntStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.createAutoCloseLongStream(LongStream longStream) Creates and returns a new wrapped LongStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.<T> Stream<T>createAutoCloseStream(Stream<T> stream) Creates and returns a new wrapped Stream that will call itsBaseStream.close()method automatically after a terminating operation has been called.
-
Method Details
-
createAutoCloseStream
Creates and returns a new wrapped Stream that will call itsBaseStream.close()method automatically after a terminating operation has been called.N.B. The
BaseStream.iterator()BaseStream.spliterator()methods will throw anUnsupportedOperationExceptionbecause otherwise the AutoClose property cannot be guaranteed. This can be unlocked by setting the system property "jpastreamer.allowiteratorandspliterator" totrue.- Type Parameters:
T- Stream type
-
createAutoCloseIntStream
Creates and returns a new wrapped IntStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.N.B. The
BaseStream.iterator()BaseStream.spliterator()methods will throw anUnsupportedOperationExceptionbecause otherwise the AutoClose property cannot be guaranteed. This can be unlocked by setting the system property "jpastreamer.allowiteratorandspliterator" totrue. -
createAutoCloseLongStream
Creates and returns a new wrapped LongStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.N.B. The
BaseStream.iterator()BaseStream.spliterator()methods will throw anUnsupportedOperationExceptionbecause otherwise the AutoClose property cannot be guaranteed. This can be unlocked by setting the system property "jpastreamer.allowiteratorandspliterator" totrue. -
createAutoCloseDoubleStream
Creates and returns a new wrapped DoubleStream that will call itsBaseStream.close()method automatically after a terminating operation has been called.N.B. The
BaseStream.iterator()BaseStream.spliterator()methods will throw anUnsupportedOperationExceptionbecause otherwise the AutoClose property cannot be guaranteed. This can be unlocked by setting the system property "jpastreamer.allowiteratorandspliterator" totrue.
-