public interface IntCacheStream extends IntStream
IntStream that has additional methods to allow for Serializable instances. Please see
CacheStream for additional details about various methods.IntStream.Builder| Modifier and Type | Method and Description |
|---|---|
default boolean |
allMatch(SerializableIntPredicate predicate)
Same as
IntStream.allMatch(IntPredicate) except that the IntPredicate must
also implement Serializable |
default boolean |
anyMatch(SerializableIntPredicate predicate)
Same as
IntStream.anyMatch(IntPredicate) except that the IntPredicate must
also implement Serializable |
DoubleCacheStream |
asDoubleStream() |
LongCacheStream |
asLongStream() |
CacheStream<Integer> |
boxed() |
default <R> R |
collect(SerializableSupplier<R> supplier,
SerializableObjIntConsumer<R> accumulator,
SerializableBiConsumer<R,R> combiner)
Same as
IntStream.collect(Supplier, ObjIntConsumer, BiConsumer) except that the arguments must also
implement Serializable |
IntCacheStream |
distinct() |
IntCacheStream |
filter(IntPredicate predicate) |
default IntCacheStream |
filter(SerializableIntPredicate predicate)
Same as
filter(IntPredicate) except that the IntPredicate must also
implement Serializable |
IntCacheStream |
flatMap(IntFunction<? extends IntStream> mapper) |
default IntCacheStream |
flatMap(SerializableIntFunction<? extends IntStream> mapper)
Same as
flatMap(IntFunction) except that the IntFunction must also
implement Serializable |
<K,V> void |
forEach(ObjIntConsumer<Cache<K,V>> action)
Same as
IntStream.forEach(IntConsumer) except that it takes an ObjIntConsumer that
provides access to the underlying Cache that is backing this stream. |
default void |
forEach(SerializableIntConsumer action)
Same as
IntStream.forEach(IntConsumer) except that the IntConsumer must also
implement Serializable |
default <K,V> void |
forEach(SerializableObjIntConsumer<Cache<K,V>> action)
|
IntCacheStream |
limit(long maxSize) |
IntCacheStream |
map(IntUnaryOperator mapper) |
default IntCacheStream |
map(SerializableIntUnaryOperator mapper)
Same as
map(IntUnaryOperator) except that the IntUnaryOperator must also
implement Serializable |
DoubleCacheStream |
mapToDouble(IntToDoubleFunction mapper) |
default DoubleCacheStream |
mapToDouble(SerializableIntToDoubleFunction mapper)
Same as
mapToDouble(IntToDoubleFunction) except that the IntToIntFunction must also
implement Serializable |
LongCacheStream |
mapToLong(IntToLongFunction mapper) |
default LongCacheStream |
mapToLong(SerializableIntToLongFunction mapper)
Same as
mapToLong(IntToLongFunction) except that the IntToLongFunction must also
implement Serializable |
<U> CacheStream<U> |
mapToObj(IntFunction<? extends U> mapper) |
default <U> CacheStream<U> |
mapToObj(SerializableIntFunction<? extends U> mapper)
Same as
mapToObj(IntFunction) except that the IntFunction must also
implement Serializable |
default boolean |
noneMatch(SerializableIntPredicate predicate)
Same as
IntStream.noneMatch(IntPredicate) except that the IntPredicate must
also implement Serializable |
IntCacheStream |
onClose(Runnable closeHandler) |
IntCacheStream |
parallel() |
IntCacheStream |
peek(IntConsumer action) |
default IntCacheStream |
peek(SerializableIntConsumer action)
Same as
flatMap(IntFunction) except that the IntFunction must also
implement Serializable |
default int |
reduce(int identity,
SerializableIntBinaryOperator op)
Same as
IntStream.reduce(int, IntBinaryOperator) except that the IntBinaryOperator
must also implement Serializable |
default OptionalInt |
reduce(SerializableIntBinaryOperator op)
Same as
IntStream.reduce(IntBinaryOperator) except that the IntBinaryOperator must
also implement Serializable |
IntCacheStream |
sequential() |
IntCacheStream |
skip(long n) |
IntCacheStream |
sorted() |
IntCacheStream |
unordered() |
allMatch, anyMatch, average, builder, collect, concat, count, empty, findAny, findFirst, forEach, forEachOrdered, generate, iterate, iterator, max, min, noneMatch, of, of, range, rangeClosed, reduce, reduce, spliterator, sum, summaryStatistics, toArrayclose, isParallelIntCacheStream filter(IntPredicate predicate)
default IntCacheStream filter(SerializableIntPredicate predicate)
filter(IntPredicate) except that the IntPredicate must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
predicate - a non-interfering, stateless
predicate to apply to each element to determine if it
should be includedIntCacheStream map(IntUnaryOperator mapper)
default IntCacheStream map(SerializableIntUnaryOperator mapper)
map(IntUnaryOperator) except that the IntUnaryOperator must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
mapper - a non-interfering, stateless
function to apply to each element<U> CacheStream<U> mapToObj(IntFunction<? extends U> mapper)
default <U> CacheStream<U> mapToObj(SerializableIntFunction<? extends U> mapper)
mapToObj(IntFunction) except that the IntFunction must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
U - the element type of the new streammapper - a non-interfering, stateless
function to apply to each elementDoubleCacheStream mapToDouble(IntToDoubleFunction mapper)
mapToDouble in interface IntStreamdefault DoubleCacheStream mapToDouble(SerializableIntToDoubleFunction mapper)
mapToDouble(IntToDoubleFunction) except that the IntToIntFunction must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
mapper - a non-interfering, stateless
function to apply to each elementLongCacheStream mapToLong(IntToLongFunction mapper)
default LongCacheStream mapToLong(SerializableIntToLongFunction mapper)
mapToLong(IntToLongFunction) except that the IntToLongFunction must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
mapper - a non-interfering, stateless
function to apply to each elementIntCacheStream flatMap(IntFunction<? extends IntStream> mapper)
default IntCacheStream flatMap(SerializableIntFunction<? extends IntStream> mapper)
flatMap(IntFunction) except that the IntFunction must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
mapper - a non-interfering, stateless
function to apply to each element which produces a
IntStream of new valuesIntCacheStream distinct()
IntCacheStream sorted()
IntCacheStream peek(IntConsumer action)
default IntCacheStream peek(SerializableIntConsumer action)
flatMap(IntFunction) except that the IntFunction must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
action - a non-interfering action to perform on the elements as
they are consumed from the streamIntCacheStream limit(long maxSize)
IntCacheStream skip(long n)
default void forEach(SerializableIntConsumer action)
IntStream.forEach(IntConsumer) except that the IntConsumer must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
action - a non-interfering action to perform on the elements<K,V> void forEach(ObjIntConsumer<Cache<K,V>> action)
IntStream.forEach(IntConsumer) except that it takes an ObjIntConsumer that
provides access to the underlying Cache that is backing this stream.
Note that the CacheAware interface is not supported for injection using this method as the cache
is provided in the consumer directly.
K - key type of the cacheV - value type of the cacheaction - consumer to be ran for each element in the streamdefault <K,V> void forEach(SerializableObjIntConsumer<Cache<K,V>> action)
K - key type of the cacheV - value type of the cacheaction - consumer to be ran for each element in the streamdefault int reduce(int identity,
SerializableIntBinaryOperator op)
IntStream.reduce(int, IntBinaryOperator) except that the IntBinaryOperator
must also implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
identity - the identity value for the accumulating functionop - an associative, non-interfering, stateless
function for combining two valuesdefault OptionalInt reduce(SerializableIntBinaryOperator op)
IntStream.reduce(IntBinaryOperator) except that the IntBinaryOperator must
also implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
op - an associative, non-interfering, stateless
function for combining two valuesdefault <R> R collect(SerializableSupplier<R> supplier, SerializableObjIntConsumer<R> accumulator, SerializableBiConsumer<R,R> combiner)
IntStream.collect(Supplier, ObjIntConsumer, BiConsumer) except that the arguments must also
implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
R - type of the resultsupplier - a function that creates a new result container. For a
parallel execution, this function may be called
multiple times and must return a fresh value each time.accumulator - an associative, non-interfering, stateless
function for incorporating an additional element into a resultcombiner - an associative, non-interfering, stateless
function for combining two values, which must be
compatible with the accumulator functiondefault boolean anyMatch(SerializableIntPredicate predicate)
IntStream.anyMatch(IntPredicate) except that the IntPredicate must
also implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
predicate - a non-interfering, stateless
predicate to apply to elements of this streamtrue if any elements of the stream match the provided
predicate, otherwise falsedefault boolean allMatch(SerializableIntPredicate predicate)
IntStream.allMatch(IntPredicate) except that the IntPredicate must
also implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
predicate - a non-interfering, stateless
predicate to apply to elements of this streamtrue if either all elements of the stream match the
provided predicate or the stream is empty, otherwise falsedefault boolean noneMatch(SerializableIntPredicate predicate)
IntStream.noneMatch(IntPredicate) except that the IntPredicate must
also implement Serializable
The compiler will pick this overload for lambda parameters, making them Serializable
predicate - a non-interfering, stateless
predicate to apply to elements of this streamtrue if either no elements of the stream match the
provided predicate or the stream is empty, otherwise falseCacheStream<Integer> boxed()
DoubleCacheStream asDoubleStream()
asDoubleStream in interface IntStreamLongCacheStream asLongStream()
asLongStream in interface IntStreamIntCacheStream sequential()
sequential in interface BaseStream<Integer,IntStream>sequential in interface IntStreamIntCacheStream parallel()
IntCacheStream unordered()
unordered in interface BaseStream<Integer,IntStream>IntCacheStream onClose(Runnable closeHandler)
onClose in interface BaseStream<Integer,IntStream>Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.