Type Parameters:
T - the type of the stream elements
All Superinterfaces:
AutoCloseable, BaseStream<T, Stream<T>>

  • Nested Class Summary

    Nested Classes

    static interface 

    A mutable builder for a Stream.

  • Method Summary

    boolean

    Returns whether all elements of this stream match the provided predicate.

    boolean

    Returns whether any elements of this stream match the provided predicate.

    builder()

    Returns a builder for a Stream.

    <R> R

    <R,A> R

    Performs a mutable reduction operation on the elements of this stream using a Collector.

    Creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.

    long

    count()

    Returns the count of elements in this stream.

    distinct()

    Returns a stream consisting of the distinct elements (according to Object.equals(Object)) of this stream.

    Returns, if this stream is ordered, a stream consisting of the remaining elements of this stream after dropping the longest prefix of elements that match the given predicate.

    empty()

    Returns an empty sequential Stream.

    Returns a stream consisting of the elements of this stream that match the given predicate.

    findAny()

    Returns an Optional describing some element of the stream, or an empty Optional if the stream is empty.

    findFirst()

    Returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty.

    flatMap(Function<? super T, ? extends Stream<? extends R>> 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.

    Returns an DoubleStream 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.

    Returns an IntStream 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.

    Returns an LongStream 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.

    void

    Performs an action for each element of this stream.

    void

    Performs an action for each element of this stream, in the encounter order of the stream if the stream has a defined encounter order.

    gather(Gatherer<? super T, ?, R> gatherer)

    Returns a stream consisting of the results of applying the given Gatherer to the elements of this stream.

    Returns an infinite sequential unordered stream where each element is generated by the provided Supplier.

    Returns a sequential ordered Stream produced by iterative application of the given next function to an initial element, conditioned on satisfying the given hasNext predicate.

    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.

    limit(long maxSize)

    Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length.

    map(Function<? super T, ? extends R> mapper)

    Returns a stream consisting of the results of applying the given function to the elements of this stream.

    Returns a stream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.

    Returns a DoubleStream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.

    Returns an IntStream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.

    Returns a LongStream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.

    Returns a DoubleStream consisting of the results of applying the given function to the elements of this stream.

    Returns an IntStream consisting of the results of applying the given function to the elements of this stream.

    Returns a LongStream consisting of the results of applying the given function to the elements of this stream.

    Returns the maximum element of this stream according to the provided Comparator.

    Returns the minimum element of this stream according to the provided Comparator.

    boolean

    Returns whether no elements of this stream match the provided predicate.

    of(T t)

    Returns a sequential Stream containing a single element.

    of(T... values)

    Returns a sequential ordered stream whose elements are the specified values.

    ofNullable(T t)

    Returns a sequential Stream containing a single element, if non-null, otherwise returns an empty Stream.

    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.

    Performs a reduction on the elements of this stream, using an associative accumulation function, and returns an Optional describing the reduced value, if any.

    Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value.

    <U> U

    Performs a reduction on the elements of this stream, using the provided identity, accumulation and combining functions.

    skip(long n)

    Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.

    sorted()

    Returns a stream consisting of the elements of this stream, sorted according to natural order.

    Returns a stream consisting of the elements of this stream, sorted according to the provided Comparator.

    Returns, if this stream is ordered, a stream consisting of the longest prefix of elements taken from this stream that match the given predicate.

    toArray()

    Returns an array containing the elements of this stream.

    <A> A[]

    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.

    toList()

    Accumulates the elements of this stream into a List.

  • Method Details

    • filter

    • map

    • mapToInt

    • mapToLong

    • mapToDouble

    • flatMap

    • flatMapToInt

    • flatMapToLong

    • flatMapToDouble

    • mapMulti

    • mapMultiToInt

    • mapMultiToLong

    • mapMultiToDouble

    • distinct

    • sorted

    • sorted

    • peek

    • limit

    • skip

    • takeWhile

    • dropWhile

    • forEach

    • forEachOrdered

    • toArray

    • toArray

    • reduce

    • reduce

    • reduce

    • gather

    • collect

    • collect

    • toList

    • min

    • max

    • count

    • anyMatch

    • allMatch

    • noneMatch

    • findFirst

    • findAny

    • builder

    • empty

    • of

    • ofNullable

    • of

    • iterate

    • iterate

    • generate

    • concat