Package | Description |
---|---|
java8.util |
Provides some of the new
java.util classes and implementations
of static and default interface methods added in Java 8. |
java8.util.concurrent |
The Java 7 and Java 8 utility classes commonly used in concurrent programming.
|
java8.util.stream |
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
|
Modifier and Type | Method and Description |
---|---|
IntStream |
SplittableRandom.ints()
Returns an effectively unlimited stream of pseudorandom
int
values from this generator and/or one split from it. |
IntStream |
SplittableRandom.ints(int randomNumberOrigin,
int randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
int values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive). |
IntStream |
SplittableRandom.ints(long streamSize)
Returns a stream producing the given
streamSize number
of pseudorandom int values from this generator and/or
one split from it. |
IntStream |
SplittableRandom.ints(long streamSize,
int randomNumberOrigin,
int randomNumberBound)
Returns a stream producing the given
streamSize number
of pseudorandom int values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive). |
IntStream |
OptionalInt.stream()
If a value is present, returns a sequential
IntStream containing
only that value, otherwise returns an empty IntStream . |
static IntStream |
J8Arrays.stream(int[] array)
Returns a sequential
IntStream with the specified array as its
source. |
static IntStream |
J8Arrays.stream(int[] array,
int startInclusive,
int endExclusive)
Returns a sequential
IntStream with the specified range of the
specified array as its source. |
Modifier and Type | Method and Description |
---|---|
IntStream |
ThreadLocalRandom.ints()
Returns an effectively unlimited stream of pseudorandom
int
values. |
IntStream |
ThreadLocalRandom.ints(int randomNumberOrigin,
int randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
int values, each conforming to the given origin (inclusive) and bound
(exclusive). |
IntStream |
ThreadLocalRandom.ints(long streamSize)
Returns a stream producing the given
streamSize number of
pseudorandom int values. |
IntStream |
ThreadLocalRandom.ints(long streamSize,
int randomNumberOrigin,
int randomNumberBound)
Returns a stream producing the given
streamSize number
of pseudorandom int values, each conforming to the given
origin (inclusive) and bound (exclusive). |
Modifier and Type | Method and Description |
---|---|
IntStream |
IntStream.Builder.build()
Builds the stream, transitioning this builder to the built state.
|
static IntStream |
IntStreams.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.
|
IntStream |
IntStream.distinct()
Returns a stream consisting of the distinct elements of this stream.
|
IntStream |
IntStream.dropWhile(IntPredicate predicate)
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.
|
static IntStream |
IntStreams.dropWhile(IntStream stream,
IntPredicate predicate)
Returns a stream consisting of the remaining elements of the passed
stream after discarding elements that match the given predicate up to,
but not discarding, the first element encountered that does not match
the predicate.
|
static IntStream |
IntStreams.empty()
Returns an empty sequential
IntStream . |
IntStream |
IntStream.filter(IntPredicate predicate)
Returns a stream consisting of the elements of this stream that match
the given predicate.
|
IntStream |
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.
|
IntStream |
Stream.flatMapToInt(Function<? super T,? extends IntStream> mapper)
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. |
static IntStream |
IntStreams.generate(IntSupplier s)
Returns an infinite sequential unordered stream where each element is
generated by the provided
IntSupplier . |
static IntStream |
StreamSupport.intStream(Spliterator.OfInt spliterator,
boolean parallel)
Creates a new sequential or parallel
IntStream from a
Spliterator.OfInt . |
static IntStream |
StreamSupport.intStream(Supplier<? extends Spliterator.OfInt> supplier,
int characteristics,
boolean parallel)
Creates a new sequential or parallel
IntStream from a
Supplier of Spliterator.OfInt . |
static IntStream |
IntStreams.iterate(int seed,
IntPredicate hasNext,
IntUnaryOperator next)
Returns a sequential ordered
IntStream produced by iterative
application of the given next function to an initial element,
conditioned on satisfying the given hasNext predicate. |
static IntStream |
IntStreams.iterate(int seed,
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. |
IntStream |
IntStream.limit(long maxSize)
Returns a stream consisting of the elements of this stream, truncated
to be no longer than
maxSize in length. |
IntStream |
IntStream.map(IntUnaryOperator mapper)
Returns a stream consisting of the results of applying the given
function to the elements of this stream.
|
IntStream |
DoubleStream.mapToInt(DoubleToIntFunction mapper)
Returns an
IntStream consisting of the results of applying the
given function to the elements of this stream. |
IntStream |
LongStream.mapToInt(LongToIntFunction mapper)
Returns an
IntStream consisting of the results of applying the
given function to the elements of this stream. |
IntStream |
Stream.mapToInt(ToIntFunction<? super T> mapper)
Returns an
IntStream consisting of the results of applying the
given function to the elements of this stream. |
static IntStream |
IntStreams.of(int... values)
Returns a sequential ordered stream whose elements are the specified values.
|
static IntStream |
IntStreams.of(int t)
Returns a sequential
IntStream containing a single element. |
IntStream |
IntStream.parallel() |
IntStream |
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.
|
static IntStream |
IntStreams.range(int startInclusive,
int endExclusive)
Returns a sequential ordered
IntStream from startInclusive
(inclusive) to endExclusive (exclusive) by an incremental step of
1 . |
static IntStream |
IntStreams.rangeClosed(int startInclusive,
int endInclusive)
Returns a sequential ordered
IntStream from startInclusive
(inclusive) to endInclusive (inclusive) by an incremental step of
1 . |
IntStream |
IntStream.sequential() |
IntStream |
IntStream.skip(long n)
Returns a stream consisting of the remaining elements of this stream
after discarding the first
n elements of the stream. |
IntStream |
IntStream.sorted()
Returns a stream consisting of the elements of this stream in sorted
order.
|
IntStream |
IntStream.takeWhile(IntPredicate predicate)
Returns, if this stream is ordered, a stream consisting of the longest
prefix of elements taken from this stream that match the given predicate.
|
static IntStream |
IntStreams.takeWhile(IntStream stream,
IntPredicate predicate)
Returns a stream consisting of elements of the passed stream that match
the given predicate up to, but discarding, the first element encountered
that does not match the predicate.
|
Modifier and Type | Method and Description |
---|---|
static IntStream |
IntStreams.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.
|
static IntStream |
IntStreams.dropWhile(IntStream stream,
IntPredicate predicate)
Returns a stream consisting of the remaining elements of the passed
stream after discarding elements that match the given predicate up to,
but not discarding, the first element encountered that does not match
the predicate.
|
static IntStream |
IntStreams.takeWhile(IntStream stream,
IntPredicate predicate)
Returns a stream consisting of elements of the passed stream that match
the given predicate up to, but discarding, the first element encountered
that does not match the predicate.
|
Modifier and Type | Method and Description |
---|---|
IntStream |
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.
|
IntStream |
Stream.flatMapToInt(Function<? super T,? extends IntStream> mapper)
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. |
Copyright © 2016. All rights reserved.