Package | Description |
---|---|
java.util | |
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 |
---|---|
LongStream |
Random.longs()
Throws
AssertionError always. |
LongStream |
Random.longs(long streamSize)
Throws
AssertionError always. |
LongStream |
Random.longs(long randomNumberOrigin,
long randomNumberBound)
Throws
AssertionError always. |
LongStream |
Random.longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound)
Throws
AssertionError always. |
Modifier and Type | Method and Description |
---|---|
LongStream |
SplittableRandom.longs()
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it. |
LongStream |
SplittableRandom.longs(long streamSize)
Returns a stream producing the given
streamSize number
of pseudorandom long values from this generator and/or
one split from it. |
LongStream |
SplittableRandom.longs(long randomNumberOrigin,
long randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
long values from this generator and/or one split from it; each value
conforms to the given origin (inclusive) and bound (exclusive). |
LongStream |
SplittableRandom.longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound)
Returns a stream producing the given
streamSize number of
pseudorandom long values from this generator and/or one split
from it; each value conforms to the given origin (inclusive) and bound
(exclusive). |
LongStream |
OptionalLong.stream()
If a value is present, returns a sequential
LongStream containing
only that value, otherwise returns an empty LongStream . |
static LongStream |
J8Arrays.stream(long[] array)
Returns a sequential
LongStream with the specified array as its
source. |
static LongStream |
J8Arrays.stream(long[] array,
int startInclusive,
int endExclusive)
Returns a sequential
LongStream with the specified range of the
specified array as its source. |
Modifier and Type | Method and Description |
---|---|
LongStream |
ThreadLocalRandom.longs()
Returns an effectively unlimited stream of pseudorandom
long
values. |
LongStream |
ThreadLocalRandom.longs(long streamSize)
Returns a stream producing the given
streamSize number of
pseudorandom long values. |
LongStream |
ThreadLocalRandom.longs(long randomNumberOrigin,
long randomNumberBound)
Returns an effectively unlimited stream of pseudorandom
long values, each conforming to the given origin (inclusive) and bound
(exclusive). |
LongStream |
ThreadLocalRandom.longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound)
Returns a stream producing the given
streamSize number of
pseudorandom long , each conforming to the given origin
(inclusive) and bound (exclusive). |
Modifier and Type | Method and Description |
---|---|
LongStream |
IntStream.asLongStream()
Returns a
LongStream consisting of the elements of this stream,
converted to long . |
LongStream |
LongStream.Builder.build()
Builds the stream, transitioning this builder to the built state.
|
static LongStream |
LongStreams.concat(LongStream a,
LongStream 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.
|
LongStream |
LongStream.distinct()
Returns a stream consisting of the distinct elements of this stream.
|
LongStream |
LongStream.dropWhile(LongPredicate 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 LongStream |
LongStreams.dropWhile(LongStream stream,
LongPredicate 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 LongStream |
LongStreams.empty()
Returns an empty sequential
LongStream . |
LongStream |
LongStream.filter(LongPredicate predicate)
Returns a stream consisting of the elements of this stream that match
the given predicate.
|
LongStream |
LongStream.flatMap(LongFunction<? extends LongStream> 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.
|
LongStream |
Stream.flatMapToLong(Function<? super T,? extends LongStream> mapper)
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. |
static LongStream |
LongStreams.generate(LongSupplier s)
Returns an infinite sequential unordered stream where each element is
generated by the provided
LongSupplier . |
static LongStream |
LongStreams.iterate(long seed,
LongPredicate predicate,
LongUnaryOperator f)
Returns a sequential ordered
LongStream produced by iterative
application of a function to an initial element, conditioned on
satisfying the supplied predicate. |
static LongStream |
LongStreams.iterate(long seed,
LongUnaryOperator f)
Returns an infinite sequential ordered
LongStream 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. |
LongStream |
LongStream.limit(long maxSize)
Returns a stream consisting of the elements of this stream, truncated
to be no longer than
maxSize in length. |
static LongStream |
StreamSupport.longStream(Spliterator.OfLong spliterator,
boolean parallel)
Creates a new sequential or parallel
LongStream from a
Spliterator.OfLong . |
static LongStream |
StreamSupport.longStream(Supplier<? extends Spliterator.OfLong> supplier,
int characteristics,
boolean parallel)
Creates a new sequential or parallel
LongStream from a
Supplier of Spliterator.OfLong . |
LongStream |
LongStream.map(LongUnaryOperator mapper)
Returns a stream consisting of the results of applying the given
function to the elements of this stream.
|
LongStream |
DoubleStream.mapToLong(DoubleToLongFunction mapper)
Returns a
LongStream consisting of the results of applying the
given function to the elements of this stream. |
LongStream |
IntStream.mapToLong(IntToLongFunction mapper)
Returns a
LongStream consisting of the results of applying the
given function to the elements of this stream. |
LongStream |
Stream.mapToLong(ToLongFunction<? super T> mapper)
Returns a
LongStream consisting of the results of applying the
given function to the elements of this stream. |
static LongStream |
LongStreams.of(long... values)
Returns a sequential ordered stream whose elements are the specified values.
|
static LongStream |
LongStreams.of(long t)
Returns a sequential
LongStream containing a single element. |
LongStream |
LongStream.parallel() |
LongStream |
LongStream.peek(LongConsumer 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 LongStream |
LongStreams.range(long startInclusive,
long endExclusive)
Returns a sequential ordered
LongStream from startInclusive
(inclusive) to endExclusive (exclusive) by an incremental step of
1 . |
static LongStream |
LongStreams.rangeClosed(long startInclusive,
long endInclusive)
Returns a sequential ordered
LongStream from startInclusive
(inclusive) to endInclusive (inclusive) by an incremental step of
1 . |
LongStream |
LongStream.sequential() |
LongStream |
LongStream.skip(long n)
Returns a stream consisting of the remaining elements of this stream
after discarding the first
n elements of the stream. |
LongStream |
LongStream.sorted()
Returns a stream consisting of the elements of this stream in sorted
order.
|
LongStream |
LongStream.takeWhile(LongPredicate 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 LongStream |
LongStreams.takeWhile(LongStream stream,
LongPredicate 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 LongStream |
LongStreams.concat(LongStream a,
LongStream 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 LongStream |
LongStreams.dropWhile(LongStream stream,
LongPredicate 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 LongStream |
LongStreams.takeWhile(LongStream stream,
LongPredicate 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 |
---|---|
LongStream |
LongStream.flatMap(LongFunction<? extends LongStream> 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.
|
LongStream |
Stream.flatMapToLong(Function<? super T,? extends LongStream> mapper)
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. |
Copyright © 2016. All rights reserved.