Uses of Interface
java.util.stream.LongStream
Packages that use LongStream
Package
Description
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
This package contains classes and interfaces that support a generic API
for random number generation.
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
-
Uses of LongStream in java.util
Methods in java.util that return LongStreamModifier and TypeMethodDescriptionRandom.longs()Returns an effectively unlimited stream of pseudorandomlongvalues.Random.longs(long streamSize) Returns a stream producing the givenstreamSizenumber of pseudorandomlongvalues.Random.longs(long randomNumberOrigin, long randomNumberBound) Returns an effectively unlimited stream of pseudorandomlongvalues, each conforming to the given origin (inclusive) and bound (exclusive).Random.longs(long streamSize, long randomNumberOrigin, long randomNumberBound) Returns a stream producing the givenstreamSizenumber of pseudorandomlong, each conforming to the given origin (inclusive) and bound (exclusive).SplittableRandom.longs()Returns an effectively unlimited stream of pseudorandomlongvalues from this generator and/or one split from it.SplittableRandom.longs(long streamSize) Returns a stream producing the givenstreamSizenumber of pseudorandomlongvalues from this generator and/or one split from it.SplittableRandom.longs(long randomNumberOrigin, long randomNumberBound) Returns an effectively unlimited stream of pseudorandomlongvalues from this generator and/or one split from it; each value conforms to the given origin (inclusive) and bound (exclusive).SplittableRandom.longs(long streamSize, long randomNumberOrigin, long randomNumberBound) Returns a stream producing the givenstreamSizenumber of pseudorandomlongvalues from this generator and/or one split from it; each value conforms to the given origin (inclusive) and bound (exclusive).static LongStreamArrays.stream(long[] array) Returns a sequentialLongStreamwith the specified array as its source.static LongStreamArrays.stream(long[] array, int startInclusive, int endExclusive) Returns a sequentialLongStreamwith the specified range of the specified array as its source.OptionalLong.stream()If a value is present, returns a sequentialLongStreamcontaining only that value, otherwise returns an emptyLongStream. -
Uses of LongStream in java.util.concurrent
Methods in java.util.concurrent that return LongStreamModifier and TypeMethodDescriptionThreadLocalRandom.longs()Returns an effectively unlimited stream of pseudorandomlongvalues.ThreadLocalRandom.longs(long streamSize) Returns a stream producing the givenstreamSizenumber of pseudorandomlongvalues.ThreadLocalRandom.longs(long randomNumberOrigin, long randomNumberBound) Returns an effectively unlimited stream of pseudorandomlongvalues, each conforming to the given origin (inclusive) and bound (exclusive).ThreadLocalRandom.longs(long streamSize, long randomNumberOrigin, long randomNumberBound) Returns a stream producing the givenstreamSizenumber of pseudorandomlong, each conforming to the given origin (inclusive) and bound (exclusive). -
Uses of LongStream in java.util.random
Methods in java.util.random that return LongStreamModifier and TypeMethodDescriptiondefault LongStreamRandomGenerator.longs()Returns an effectively unlimited stream of pseudorandomly chosenlongvalues.default LongStreamRandomGenerator.longs(long streamSize) Returns a stream producing the givenstreamSizenumber of pseudorandomly chosenlongvalues.default LongStreamRandomGenerator.longs(long randomNumberOrigin, long randomNumberBound) Returns an effectively unlimited stream of pseudorandomly chosenlongvalues, where each value is between the specified origin (inclusive) and the specified bound (exclusive).default LongStreamRandomGenerator.longs(long streamSize, long randomNumberOrigin, long randomNumberBound) Returns a stream producing the givenstreamSizenumber of pseudorandomly chosenlongvalues, where each value is between the specified origin (inclusive) and the specified bound (exclusive). -
Uses of LongStream in java.util.stream
Methods in java.util.stream that return LongStreamModifier and TypeMethodDescriptionIntStream.asLongStream()Returns aLongStreamconsisting of the elements of this stream, converted tolong.LongStream.Builder.build()Builds the stream, transitioning this builder to the built state.static LongStreamLongStream.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.distinct()Returns a stream consisting of the distinct elements of this stream.default LongStreamLongStream.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 LongStreamLongStream.empty()Returns an empty sequentialLongStream.LongStream.filter(LongPredicate predicate) Returns a stream consisting of the elements of this stream that match the given predicate.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.Stream.flatMapToLong(Function<? super T, ? extends LongStream> mapper) Returns anLongStreamconsisting 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 LongStreamLongStream.generate(LongSupplier s) Returns an infinite sequential unordered stream where each element is generated by the providedLongSupplier.static LongStreamLongStream.iterate(long seed, LongPredicate hasNext, LongUnaryOperator next) Returns a sequential orderedLongStreamproduced by iterative application of the givennextfunction to an initial element, conditioned on satisfying the givenhasNextpredicate.static LongStreamLongStream.iterate(long seed, LongUnaryOperator f) Returns an infinite sequential orderedLongStreamproduced by iterative application of a functionfto an initial elementseed, producing aStreamconsisting ofseed,f(seed),f(f(seed)), etc.LongStream.limit(long maxSize) Returns a stream consisting of the elements of this stream, truncated to be no longer thanmaxSizein length.static LongStreamStreamSupport.longStream(Supplier<? extends Spliterator.OfLong> supplier, int characteristics, boolean parallel) Creates a new sequential or parallelLongStreamfrom aSupplierofSpliterator.OfLong.static LongStreamStreamSupport.longStream(Spliterator.OfLong spliterator, boolean parallel) Creates a new sequential or parallelLongStreamfrom aSpliterator.OfLong.LongStream.map(LongUnaryOperator mapper) Returns a stream consisting of the results of applying the given function to the elements of this stream.default LongStreamLongStream.mapMulti(LongStream.LongMapMultiConsumer mapper) Returns a stream consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.default LongStreamStream.mapMultiToLong(BiConsumer<? super T, ? super LongConsumer> mapper) Returns aLongStreamconsisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.DoubleStream.mapToLong(DoubleToLongFunction mapper) Returns aLongStreamconsisting of the results of applying the given function to the elements of this stream.IntStream.mapToLong(IntToLongFunction mapper) Returns aLongStreamconsisting of the results of applying the given function to the elements of this stream.Stream.mapToLong(ToLongFunction<? super T> mapper) Returns aLongStreamconsisting of the results of applying the given function to the elements of this stream.static LongStreamLongStream.of(long t) Returns a sequentialLongStreamcontaining a single element.static LongStreamLongStream.of(long... values) Returns a sequential ordered stream whose elements are the specified values.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 LongStreamLongStream.range(long startInclusive, long endExclusive) Returns a sequential orderedLongStreamfromstartInclusive(inclusive) toendExclusive(exclusive) by an incremental step of1.static LongStreamLongStream.rangeClosed(long startInclusive, long endInclusive) Returns a sequential orderedLongStreamfromstartInclusive(inclusive) toendInclusive(inclusive) by an incremental step of1.LongStream.skip(long n) Returns a stream consisting of the remaining elements of this stream after discarding the firstnelements of the stream.LongStream.sorted()Returns a stream consisting of the elements of this stream in sorted order.default LongStreamLongStream.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.Methods in java.util.stream with parameters of type LongStreamModifier and TypeMethodDescriptionstatic LongStreamLongStream.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.Method parameters in java.util.stream with type arguments of type LongStreamModifier and TypeMethodDescriptionLongStream.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.Stream.flatMapToLong(Function<? super T, ? extends LongStream> mapper) Returns anLongStreamconsisting 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.