Java java.util.stream Stream fields, constructors, methods, implement or subclass

Example usage for Java java.util.stream Stream fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.stream Stream.

The text is from its open source code.

Implementation

java.util.stream.Stream has the following implementations.
Click this link to see all its implementation.

Method

booleanallMatch(Predicate predicate)
Returns whether all elements of this stream match the provided predicate.
booleananyMatch(Predicate predicate)
Returns whether any elements of this stream match the provided predicate.
Builderbuilder()
Returns a builder for a Stream .
voidclose()
Closes this stream, causing all close handlers for this stream pipeline to be called.
Rcollect(Collector collector)
Performs a mutable reduction operation on the elements of this stream using a Collector .
Rcollect(Supplier supplier, BiConsumer accumulator, BiConsumer combiner)
Performs a mutable reduction operation on the elements of this stream.
Streamconcat(Stream a, Stream b)
Creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
longcount()
Returns the count of elements in this stream.
Streamdistinct()
Returns a stream consisting of the distinct elements (according to Object#equals(Object) ) of this stream.
Streamempty()
Returns an empty sequential Stream .
Streamfilter(Predicate predicate)
Returns a stream consisting of the elements of this stream that match the given predicate.
OptionalfindAny()
Returns an Optional describing some element of the stream, or an empty Optional if the stream is empty.
OptionalfindFirst()
Returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty.
StreamflatMap(Function> mapper)
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
voidforEach(Consumer action)
Performs an action for each element of this stream.
voidforEachOrdered(Consumer action)
Performs an action for each element of this stream, in the encounter order of the stream if the stream has a defined encounter order.
Streamgenerate(Supplier s)
Returns an infinite sequential unordered stream where each element is generated by the provided Supplier .
Streamiterate(final T seed, final UnaryOperator f)
Returns an infinite sequential ordered Stream produced by iterative application of a function f to an initial element seed , producing a Stream consisting of seed , f(seed) , f(f(seed)) , etc.
Iteratoriterator()
Returns an iterator for the elements of this stream.
Streamlimit(long maxSize)
Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length.
Streammap(Function mapper)
Returns a stream consisting of the results of applying the given function to the elements of this stream.
Optionalmax(Comparator comparator)
Returns the maximum element of this stream according to the provided Comparator .
booleannoneMatch(Predicate predicate)
Returns whether no elements of this stream match the provided predicate.
Streamof(T t)
Returns a sequential Stream containing a single element.
Streamof(T... values)
Returns a sequential ordered stream whose elements are the specified values.
SonClose(Runnable closeHandler)
Returns an equivalent stream with an additional close handler.
Sparallel()
Returns an equivalent stream that is parallel.
Streampeek(Consumer action)
Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.
Treduce(T identity, BinaryOperator accumulator)
Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value.
Optionalreduce(BinaryOperator accumulator)
Performs a reduction on the elements of this stream, using an associative accumulation function, and returns an Optional describing the reduced value, if any.
Streamskip(long n)
Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.
Streamsorted(Comparator comparator)
Returns a stream consisting of the elements of this stream, sorted according to the provided Comparator .
Streamsorted()
Returns a stream consisting of the elements of this stream, sorted according to natural order.
Spliteratorspliterator()
Returns a spliterator for the elements of this stream.
Object[]toArray()
Returns an array containing the elements of this stream.
A[]toArray(IntFunction generator)
Returns an array containing the elements of this stream, using the provided generator function to allocate the returned array, as well as any additional arrays that might be required for a partitioned execution or for resizing.