Example usage for Java java.util.stream IntStream fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | allMatch(IntPredicate predicate) Returns whether all elements of this stream match the provided predicate. |
boolean | anyMatch(IntPredicate predicate) Returns whether any elements of this stream match the provided predicate. |
DoubleStream | asDoubleStream() Returns a DoubleStream consisting of the elements of this stream, converted to double . |
LongStream | asLongStream() Returns a LongStream consisting of the elements of this stream, converted to long . |
OptionalDouble | average() Returns an OptionalDouble describing the arithmetic mean of elements of this stream, or an empty optional if this stream is empty. |
Stream | boxed() Returns a Stream consisting of the elements of this stream, each boxed to an Integer . |
Builder | builder() Returns a builder for an IntStream . |
R | collect(Supplier Performs a mutable reduction operation on the elements of this stream. |
IntStream | concat(IntStream a, IntStream 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. |
long | count() Returns the count of elements in this stream. |
IntStream | distinct() Returns a stream consisting of the distinct elements of this stream. |
IntStream | empty() Returns an empty sequential IntStream . |
IntStream | filter(IntPredicate predicate) Returns a stream consisting of the elements of this stream that match the given predicate. |
OptionalInt | findAny() Returns an OptionalInt describing some element of the stream, or an empty OptionalInt if the stream is empty. |
OptionalInt | findFirst() Returns an OptionalInt describing the first element of this stream, or an empty OptionalInt if the stream is empty. |
IntStream | flatMap(IntFunction extends IntStream> 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. |
void | forEach(IntConsumer action) Performs an action for each element of this stream. |
void | forEachOrdered(IntConsumer action) Performs an action for each element of this stream, guaranteeing that each element is processed in encounter order for streams that have a defined encounter order. |
IntStream | generate(IntSupplier s) Returns an infinite sequential unordered stream where each element is generated by the provided IntSupplier . |
IntStream | iterate(final int seed, final IntUnaryOperator f) Returns an infinite sequential ordered IntStream 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. |
PrimitiveIterator.OfInt | iterator() |
IntStream | limit(long maxSize) Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length. |
IntStream | map(IntUnaryOperator mapper) Returns a stream consisting of the results of applying the given function to the elements of this stream. |
DoubleStream | mapToDouble(IntToDoubleFunction mapper) Returns a DoubleStream consisting of the results of applying the given function to the elements of this stream. |
LongStream | mapToLong(IntToLongFunction mapper) Returns a LongStream consisting of the results of applying the given function to the elements of this stream. |
Stream | mapToObj(IntFunction extends U> mapper) Returns an object-valued Stream consisting of the results of applying the given function to the elements of this stream. |
OptionalInt | max() Returns an OptionalInt describing the maximum element of this stream, or an empty optional if this stream is empty. |
OptionalInt | min() Returns an OptionalInt describing the minimum element of this stream, or an empty optional if this stream is empty. |
boolean | noneMatch(IntPredicate predicate) Returns whether no elements of this stream match the provided predicate. |
IntStream | of(int t) Returns a sequential IntStream containing a single element. |
IntStream | of(int... values) Returns a sequential ordered stream whose elements are the specified values. |
IntStream | parallel() |
IntStream | peek(IntConsumer 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. |
IntStream | range(int startInclusive, int endExclusive) Returns a sequential ordered IntStream from startInclusive (inclusive) to endExclusive (exclusive) by an incremental step of 1 . |
IntStream | rangeClosed(int startInclusive, int endInclusive) Returns a sequential ordered IntStream from startInclusive (inclusive) to endInclusive (inclusive) by an incremental step of 1 . |
int | reduce(int identity, IntBinaryOperator op) Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value. |
OptionalInt | reduce(IntBinaryOperator op) Performs a reduction on the elements of this stream, using an associative accumulation function, and returns an OptionalInt describing the reduced value, if any. |
IntStream | sequential() |
IntStream | skip(long n) Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream. |
Spliterator.OfInt | spliterator() |
int | sum() Returns the sum of elements in this stream. |
IntSummaryStatistics | summaryStatistics() Returns an IntSummaryStatistics describing various summary data about the elements of this stream. |
int[] | toArray() Returns an array containing the elements of this stream. |