T - the type of the stream elementspublic interface RemoteStream<T> extends Stream<T>, BaseRemoteStream<T,Stream<T>>
java.util.stream.Stream that captures
 lambdas used as method arguments as serializable lambdas.RemoteIntStream, 
RemoteLongStream, 
RemoteDoubleStream, 
com.tangosol.util.streamStream.Builder<T>| Modifier and Type | Method and Description | 
|---|---|
boolean | 
allMatch(Predicate<? super T> predicate)
Returns whether all elements of this stream match the provided predicate. 
 | 
default boolean | 
allMatch(Remote.Predicate<? super T> predicate)
Returns whether all elements of this stream match the provided predicate. 
 | 
boolean | 
anyMatch(Predicate<? super T> predicate)
Returns whether any elements of this stream match the provided predicate. 
 | 
default boolean | 
anyMatch(Remote.Predicate<? super T> predicate)
Returns whether any elements of this stream match the provided predicate. 
 | 
default <R,A> R | 
collect(Collector<? super T,A,R> collector)
Performs a mutable reduction operation on the elements of this stream
 using a  
Collector. | 
default <R> R | 
collect(Remote.Supplier<R> supplier,
       Remote.BiConsumer<R,? super T> accumulator,
       Remote.BiConsumer<R,R> combiner)
Performs a mutable reduction operation on the elements of this stream. 
 | 
<R,A> R | 
collect(RemoteCollector<? super T,A,R> collector)
Performs a mutable reduction operation on the elements of this stream
 using a  
Collector. | 
<R> R | 
collect(Supplier<R> supplier,
       BiConsumer<R,? super T> accumulator,
       BiConsumer<R,R> combiner)
Performs a mutable reduction operation on the elements of this stream. 
 | 
long | 
count()
Returns the count of elements in this stream. 
 | 
Stream<T> | 
distinct()
Returns a stream consisting of the distinct elements (according to
  
Object.equals(Object)) of this stream. | 
RemoteStream<T> | 
filter(Predicate<? super T> predicate)
Returns a stream consisting of the elements of this stream that match the
 given predicate. 
 | 
default RemoteStream<T> | 
filter(Remote.Predicate<? super T> predicate)
Returns a stream consisting of the elements of this stream that match the
 given predicate. 
 | 
Optional<T> | 
findAny()
Returns an  
Optional describing some element of the stream, or an
 empty Optional if the stream is empty. | 
Optional<T> | 
findFirst()
Returns an  
Optional describing the first element of this stream,
 or an empty Optional if the stream is empty. | 
<R> RemoteStream<R> | 
flatMap(Function<? super T,? extends Stream<? extends R>> 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. 
 | 
default <R> RemoteStream<R> | 
flatMap(Remote.Function<? super T,? extends Stream<? extends R>> 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. 
 | 
RemoteDoubleStream | 
flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
Returns an  
DoubleStream 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. | 
default RemoteDoubleStream | 
flatMapToDouble(Remote.Function<? super T,? extends DoubleStream> mapper)
Returns an  
DoubleStream 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. | 
RemoteIntStream | 
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. | 
default RemoteIntStream | 
flatMapToInt(Remote.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. | 
RemoteLongStream | 
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. | 
default RemoteLongStream | 
flatMapToLong(Remote.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. | 
void | 
forEach(Consumer<? super T> action)
Performs an action for each element of this stream. 
 | 
void | 
forEachOrdered(Consumer<? super T> action)
Performs an action for each element of this stream, in the encounter
 order of the stream if the stream has a defined encounter order. 
 | 
Stream<T> | 
limit(long maxSize)
Returns a stream consisting of the elements of this stream, truncated to
 be no longer than  
maxSize in length. | 
<R> RemoteStream<R> | 
map(Function<? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given function
 to the elements of this stream. 
 | 
default <R> RemoteStream<R> | 
map(Remote.Function<? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given function
 to the elements of this stream. 
 | 
default <R> RemoteStream<R> | 
map(ValueExtractor<? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given extractor
 to the elements of this stream. 
 | 
default RemoteDoubleStream | 
mapToDouble(Remote.ToDoubleFunction<? super T> mapper)
Returns a  
DoubleStream consisting of the results of applying the
 given function to the elements of this stream. | 
RemoteDoubleStream | 
mapToDouble(ToDoubleFunction<? super T> mapper)
Returns a  
DoubleStream consisting of the results of applying the
 given function to the elements of this stream. | 
default RemoteDoubleStream | 
mapToDouble(ValueExtractor<? super T,? extends Number> mapper)
Returns an  
DoubleStream consisting of the results of applying the
 given extractor to the elements of this stream. | 
default RemoteIntStream | 
mapToInt(Remote.ToIntFunction<? super T> mapper)
Returns an  
IntStream consisting of the results of applying the
 given function to the elements of this stream. | 
RemoteIntStream | 
mapToInt(ToIntFunction<? super T> mapper)
Returns an  
IntStream consisting of the results of applying the
 given function to the elements of this stream. | 
default RemoteIntStream | 
mapToInt(ValueExtractor<? super T,? extends Number> mapper)
Returns an  
IntStream consisting of the results of applying the
 given extractor to the elements of this stream. | 
default RemoteLongStream | 
mapToLong(Remote.ToLongFunction<? super T> mapper)
Returns a  
LongStream consisting of the results of applying the
 given function to the elements of this stream. | 
RemoteLongStream | 
mapToLong(ToLongFunction<? super T> mapper)
Returns a  
LongStream consisting of the results of applying the
 given function to the elements of this stream. | 
default RemoteLongStream | 
mapToLong(ValueExtractor<? super T,? extends Number> mapper)
Returns an  
LongStream consisting of the results of applying the
 given extractor to the elements of this stream. | 
Optional<T> | 
max(Comparator<? super T> comparator)
Returns the maximum element of this stream according to the provided
  
Comparator. | 
default Optional<T> | 
max(Remote.Comparator<? super T> comparator)
Returns the maximum element of this stream according to the provided
  
Comparator. | 
default <U> Optional<T> | 
max(ValueExtractor<? super U,? extends Comparable> extractor)
Returns the maximum element of this stream according to the attribute
 extracted by the provided  
ValueExtractor. | 
Optional<T> | 
min(Comparator<? super T> comparator)
Returns the minimum element of this stream according to the provided
  
Comparator. | 
default Optional<T> | 
min(Remote.Comparator<? super T> comparator)
Returns the minimum element of this stream according to the provided
  
Comparator. | 
default <U> Optional<T> | 
min(ValueExtractor<? super U,? extends Comparable> extractor)
Returns the minimum element of this stream according to the attribute
 extracted by the provided  
ValueExtractor. | 
boolean | 
noneMatch(Predicate<? super T> predicate)
Returns whether no elements of this stream match the provided predicate. 
 | 
default boolean | 
noneMatch(Remote.Predicate<? super T> predicate)
Returns whether no elements of this stream match the provided predicate. 
 | 
RemoteStream<T> | 
parallel()
Returns an equivalent stream that is parallel. 
 | 
RemoteStream<T> | 
peek(Consumer<? super T> 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. 
 | 
default RemoteStream<T> | 
peek(Remote.Consumer<? super T> 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. 
 | 
Optional<T> | 
reduce(BinaryOperator<T> accumulator)
Performs a reduction on the elements of this stream, using an associative
 accumulation function, and returns an  
Optional describing the
 reduced value, if any. | 
default Optional<T> | 
reduce(Remote.BinaryOperator<T> accumulator)
Performs a reduction on the elements of this stream, using an associative
 accumulation function, and returns an  
Optional describing the
 reduced value, if any. | 
T | 
reduce(T identity,
      BinaryOperator<T> accumulator)
Performs a reduction on the elements of this stream, using the provided
 identity value and an associative accumulation function, and returns the
 reduced value. 
 | 
default T | 
reduce(T identity,
      Remote.BinaryOperator<T> accumulator)
Performs a reduction on the elements of this stream, using the provided
 identity value and an associative accumulation function, and returns the
 reduced value. 
 | 
<U> U | 
reduce(U identity,
      BiFunction<U,? super T,U> accumulator,
      BinaryOperator<U> combiner)
Performs a reduction on the elements of this stream, using the provided
 identity, accumulation and combining functions. 
 | 
default <U> U | 
reduce(U identity,
      Remote.BiFunction<U,? super T,U> accumulator,
      Remote.BinaryOperator<U> combiner)
Performs a reduction on the elements of this stream, using the provided
 identity, accumulation and combining functions. 
 | 
RemoteStream<T> | 
sequential()
Returns an equivalent stream that is sequential. 
 | 
Stream<T> | 
skip(long n)
Returns a stream consisting of the remaining elements of this stream
 after discarding the first  
n elements of the stream. | 
RemoteStream<T> | 
sorted()
Returns a stream consisting of the elements of this stream, sorted
 according to natural order. 
 | 
RemoteStream<T> | 
sorted(Comparator<? super T> comparator)
Returns a stream consisting of the elements of this stream, sorted
 according to the provided  
Comparator. | 
default RemoteStream<T> | 
sorted(Remote.Comparator<? super T> comparator)
Returns a stream consisting of the elements of this stream, sorted
 according to the provided  
Comparator. | 
default RemoteStream<T> | 
sorted(Remote.Comparator<? super T> comparator,
      boolean fInverse)
Returns a stream consisting of the elements of this stream, sorted
 according to the provided  
Comparator. | 
default <U> RemoteStream<T> | 
sorted(ValueExtractor<? super U,? extends Comparable> extractor)
Returns a stream consisting of the elements of this stream, sorted
 according to attribute extracted by the provided  
ValueExtractor. | 
default <U> RemoteStream<T> | 
sorted(ValueExtractor<? super U,? extends Comparable> extractor,
      boolean fInverse)
Returns a stream consisting of the elements of this stream, sorted
 according to attribute extracted by the provided  
ValueExtractor. | 
Object[] | 
toArray()
Returns an array containing the elements of this stream. 
 | 
<A> A[] | 
toArray(IntFunction<A[]> generator)
Returns an array containing the elements of this stream, using the
 provided  
generator function to allocate the returned array, as
 well as any additional arrays that might be required for a partitioned
 execution or for resizing. | 
static <T extends Number> | 
toDoubleStream(RemoteStream<T> stream)
Convert stream of numbers into  
RemoteDoubleStream. | 
static <T extends Number> | 
toIntStream(RemoteStream<T> stream)
Convert stream of numbers into  
RemoteIntStream. | 
static <T extends Number> | 
toLongStream(RemoteStream<T> stream)
Convert stream of numbers into  
RemoteLongStream. | 
RemoteStream<T> | 
unordered()
Returns an equivalent stream that is unordered. 
 | 
builder, concat, empty, generate, iterate, of, ofpipelineclose, isParallel, iterator, onClose, spliteratorRemoteStream<T> sequential()
This is an intermediate operation.
sequential in interface BaseStream<T,Stream<T>>RemoteStream<T> parallel()
This is an intermediate operation.
parallel in interface BaseStream<T,Stream<T>>RemoteStream<T> unordered()
This is an intermediate operation.
unordered in interface BaseStream<T,Stream<T>>RemoteStream<T> filter(Predicate<? super T> predicate)
This is an intermediate operation.
default RemoteStream<T> filter(Remote.Predicate<? super T> predicate)
This is an intermediate operation.
predicate - a non-interfering, stateless predicate to apply to each
                  element to determine if it should be included<R> RemoteStream<R> map(Function<? super T,? extends R> mapper)
This is an intermediate operation.
default <R> RemoteStream<R> map(Remote.Function<? super T,? extends R> mapper)
This is an intermediate operation.
R - the type of resulting stream elementsmapper - a non-interfering, stateless
               function to apply to each elementdefault <R> RemoteStream<R> map(ValueExtractor<? super T,? extends R> mapper)
This is an intermediate operation.
R - the type of resulting stream elementsmapper - a non-interfering, stateless
               function to apply to each elementRemoteIntStream mapToInt(ToIntFunction<? super T> mapper)
IntStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
default RemoteIntStream mapToInt(Remote.ToIntFunction<? super T> mapper)
IntStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each elementdefault RemoteIntStream mapToInt(ValueExtractor<? super T,? extends Number> mapper)
IntStream consisting of the results of applying the
 given extractor to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each elementRemoteLongStream mapToLong(ToLongFunction<? super T> mapper)
LongStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
default RemoteLongStream mapToLong(Remote.ToLongFunction<? super T> mapper)
LongStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each elementdefault RemoteLongStream mapToLong(ValueExtractor<? super T,? extends Number> mapper)
LongStream consisting of the results of applying the
 given extractor to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each elementRemoteDoubleStream mapToDouble(ToDoubleFunction<? super T> mapper)
DoubleStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
mapToDouble in interface Stream<T>mapper - a non-interfering, stateless
               function to apply to each elementdefault RemoteDoubleStream mapToDouble(Remote.ToDoubleFunction<? super T> mapper)
DoubleStream consisting of the results of applying the
 given function to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each elementdefault RemoteDoubleStream mapToDouble(ValueExtractor<? super T,? extends Number> mapper)
DoubleStream consisting of the results of applying the
 given extractor to the elements of this stream.
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each element<R> RemoteStream<R> flatMap(Function<? super T,? extends Stream<? extends R>> mapper)
closed after its contents have been placed
 into this stream.  (If a mapped stream is null an empty stream 
 is used, instead.)
 This is an intermediate operation.
default <R> RemoteStream<R> flatMap(Remote.Function<? super T,? extends Stream<? extends R>> mapper)
closed after its contents have been placed
 into this stream.  (If a mapped stream is null an empty stream 
 is used, instead.)
 This is an intermediate operation.
R - The element type of the new streammapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesRemoteIntStream flatMapToInt(Function<? super T,? extends IntStream> mapper)
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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
flatMapToInt in interface Stream<T>mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)default RemoteIntStream flatMapToInt(Remote.Function<? super T,? extends IntStream> mapper)
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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)RemoteLongStream flatMapToLong(Function<? super T,? extends LongStream> mapper)
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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
flatMapToLong in interface Stream<T>mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)default RemoteLongStream flatMapToLong(Remote.Function<? super T,? extends LongStream> mapper)
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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)RemoteDoubleStream flatMapToDouble(Function<? super T,? extends DoubleStream> mapper)
DoubleStream 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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
flatMapToDouble in interface Stream<T>mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)default RemoteDoubleStream flatMapToDouble(Remote.Function<? super T,? extends DoubleStream> mapper)
DoubleStream 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.  Each mapped
 stream is closed after its contents have been
 placed into this stream.  (If a mapped stream is null an empty 
 stream is used, instead.)
 This is an intermediate operation.
mapper - a non-interfering, stateless
               function to apply to each element which produces a stream
               of new valuesflatMap(Function)RemoteStream<T> peek(Consumer<? super T> action)
This is an intermediate operation.
For parallel stream pipelines, the action may be called at whatever time and in whatever thread the element is made available by the upstream operation. If the action modifies shared state, it is responsible for providing the required synchronization.
default RemoteStream<T> peek(Remote.Consumer<? super T> action)
This is an intermediate operation.
For parallel stream pipelines, the action may be called at whatever time and in whatever thread the element is made available by the upstream operation. If the action modifies shared state, it is responsible for providing the required synchronization.
action - a non-interfering action to perform on the elements as they
               are consumed from the streamStream<T> limit(long maxSize)
maxSize in length.
 This is a short-circuiting stateful intermediate operation.
limit in interface Stream<T>maxSize - the number of elements the stream should be limited toIllegalArgumentException - if maxSize is negativeStream<T> skip(long n)
n elements of the stream.
 If this stream contains fewer than n elements then an
 empty stream will be returned.
 This is a stateful intermediate operation.
skip in interface Stream<T>n - the number of leading elements to skipIllegalArgumentException - if n is negativeStream<T> distinct()
Object.equals(Object)) of this stream.
 For ordered streams, the selection of distinct elements is stable (for duplicated elements, the element appearing first in the encounter order is preserved.) For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
RemoteStream<T> sorted()
Comparable, a java.lang.ClassCastException may be thrown
 when the terminal operation is executed.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
RemoteStream<T> sorted(Comparator<? super T> comparator)
Comparator.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
default RemoteStream<T> sorted(Remote.Comparator<? super T> comparator)
Comparator.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
comparator - a non-interfering, stateless
                   Comparator to be used to compare stream elementsdefault RemoteStream<T> sorted(Remote.Comparator<? super T> comparator, boolean fInverse)
Comparator.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
comparator - a non-interfering, stateless
                   Comparator to be used to compare stream elementsfInverse - a flag specifying whether to invert the sort orderdefault <U> RemoteStream<T> sorted(ValueExtractor<? super U,? extends Comparable> extractor)
ValueExtractor.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
U - a super type of the value to extract fromextractor - a non-interfering, stateless
                  ValueExtractor to be used to extract the attribute
                  that should be used to compare stream elementsdefault <U> RemoteStream<T> sorted(ValueExtractor<? super U,? extends Comparable> extractor, boolean fInverse)
ValueExtractor.
 For ordered streams, the sort is stable. For unordered streams, no stability guarantees are made.
This is a stateful intermediate operation.
U - the super type of value to extract fromextractor - a non-interfering, stateless
                  ValueExtractor to be used to extract the attribute
                  that should be used to compare stream elementsfInverse - a flag specifying whether to invert natural sort ordervoid forEach(Consumer<? super T> action)
This is a terminal operation.
void forEachOrdered(Consumer<? super T> action)
This is a terminal operation.
This operation processes the elements one at a time, in encounter order if one exists. Performing the action for one element happens-before performing the action for subsequent elements, but for any given element, the action may be performed in whatever thread the library chooses.
forEachOrdered in interface Stream<T>action - a non-interfering action to perform on the elementsforEach(Consumer)Object[] toArray()
This is a terminal operation.
<A> A[] toArray(IntFunction<A[]> generator)
generator function to allocate the returned array, as
 well as any additional arrays that might be required for a partitioned
 execution or for resizing.
 This is a terminal operation.
toArray in interface Stream<T>generator - a function which produces a new array of the desired
                  type and the provided lengthArrayStoreException - if the runtime type of the array returned
                             from the array generator is not a supertype
                             of the runtime type of every element in this
                             streamT reduce(T identity, BinaryOperator<T> accumulator)
     T result = identity;
     for (T element : this stream)
         result = accumulator.apply(result, element)
     return result;
 
 but is not constrained to execute sequentially.
 The identity value must be an identity for the accumulator
 function. This means that for all t, accumulator.apply(identity, t) is equal to t. The accumulator function must be an associative function.
 
This is a terminal operation.
default T reduce(T identity, Remote.BinaryOperator<T> accumulator)
     T result = identity;
     for (T element : this stream)
         result = accumulator.apply(result, element)
     return result;
 
 but is not constrained to execute sequentially.
 The identity value must be an identity for the accumulator
 function. This means that for all t, accumulator.apply(identity, t) is equal to t. The accumulator function must be an associative function.
 
This is a terminal operation.
identity - the identity value for the accumulating functionaccumulator - an associative, non-interfering, stateless function
                    for combining two valuesOptional<T> reduce(BinaryOperator<T> accumulator)
Optional describing the
 reduced value, if any. This is equivalent to:
 
     boolean foundAny = false;
     T result = null;
     for (T element : this stream) {
         if (!foundAny) {
             foundAny = true;
             result = element;
         }
         else
             result = accumulator.apply(result, element);
     }
     return foundAny ? Optional.of(result) : Optional.empty();
 
 but is not constrained to execute sequentially.
 The accumulator function must be an associative function.
 
This is a terminal operation.
reduce in interface Stream<T>accumulator - an associative, non-interfering, stateless function
                    for combining two valuesOptional describing the result of the reductionNullPointerException - if the result of the reduction is nullreduce(Object, Remote.BinaryOperator), 
min(Comparator), 
max(Comparator)default Optional<T> reduce(Remote.BinaryOperator<T> accumulator)
Optional describing the
 reduced value, if any. This is equivalent to:
 
     boolean foundAny = false;
     T result = null;
     for (T element : this stream) {
         if (!foundAny) {
             foundAny = true;
             result = element;
         }
         else
             result = accumulator.apply(result, element);
     }
     return foundAny ? Optional.of(result) : Optional.empty();
 
 but is not constrained to execute sequentially.
 The accumulator function must be an associative function.
 
This is a terminal operation.
accumulator - an associative, non-interfering, stateless function
                    for combining two valuesOptional describing the result of the reductionNullPointerException - if the result of the reduction is nullreduce(Object, Remote.BinaryOperator), 
min(Comparator), 
max(Comparator)<U> U reduce(U identity,
             BiFunction<U,? super T,U> accumulator,
             BinaryOperator<U> combiner)
     U result = identity;
     for (T element : this stream)
         result = accumulator.apply(result, element)
     return result;
 
 but is not constrained to execute sequentially.
 The identity value must be an identity for the combiner function.
  This means that for all u, combiner(identity, u) is
 equal to u.  Additionally, the combiner function must be
 compatible with the accumulator function; for all u and
 t, the following must hold:
 
     combiner.apply(u, accumulator.apply(identity, t)) ==
 accumulator.apply(u, t)
 
 This is a terminal operation.
reduce in interface Stream<T>identity - the identity value for the combiner functionaccumulator - 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 functionreduce(Remote.BinaryOperator), 
reduce(Object, Remote.BinaryOperator)default <U> U reduce(U identity,
                     Remote.BiFunction<U,? super T,U> accumulator,
                     Remote.BinaryOperator<U> combiner)
     U result = identity;
     for (T element : this stream)
         result = accumulator.apply(result, element)
     return result;
 
 but is not constrained to execute sequentially.
 The identity value must be an identity for the combiner function.
  This means that for all u, combiner(identity, u) is
 equal to u.  Additionally, the combiner function must be
 compatible with the accumulator function; for all u and
 t, the following must hold:
 
     combiner.apply(u, accumulator.apply(identity, t)) ==
 accumulator.apply(u, t)
 
 This is a terminal operation.
U - the type of stream elementsidentity - the identity value for the combiner functionaccumulator - 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 functionreduce(Remote.BinaryOperator), 
reduce(Object, Remote.BinaryOperator)<R> R collect(Supplier<R> supplier, BiConsumer<R,? super T> accumulator, BiConsumer<R,R> combiner)
ArrayList, and elements are incorporated by
 updating the state of the result rather than by replacing the result.
 This produces a result equivalent to:
 
     R result = supplier.get();
     for (T element : this stream)
         accumulator.accept(result, element);
     return result;
 
 
 Like reduce(Object, Remote.BinaryOperator), collect
 operations can be parallelized without requiring additional
 synchronization.
 
This is a terminal operation.
collect in interface Stream<T>supplier - 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 <R> R collect(Remote.Supplier<R> supplier, Remote.BiConsumer<R,? super T> accumulator, Remote.BiConsumer<R,R> combiner)
ArrayList, and elements are incorporated by
 updating the state of the result rather than by replacing the result.
 This produces a result equivalent to:
 
     R result = supplier.get();
     for (T element : this stream)
         accumulator.accept(result, element);
     return result;
 
 
 Like reduce(Object, Remote.BinaryOperator), collect
 operations can be parallelized without requiring additional
 synchronization.
 
This is a terminal operation.
R - the result typesupplier - 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 <R,A> R collect(Collector<? super T,A,R> collector)
Collector.  A Collector encapsulates the
 functions used as arguments to collect(Remote.Supplier,
 Remote.BiConsumer, Remote.BiConsumer), allowing for reuse of collection
 strategies and composition of collect operations such as multiple-level
 grouping or partitioning.
 
 If the stream is parallel, and the Collector is concurrent, and either the stream
 is unordered or the collector is unordered, then a concurrent reduction will be performed (see RemoteCollector for details on concurrent reduction.)
 
This is a terminal operation.
collect in interface Stream<T>collector - the Collector describing the reductioncollect(Remote.Supplier, Remote.BiConsumer, Remote.BiConsumer)<R,A> R collect(RemoteCollector<? super T,A,R> collector)
Collector.  A Collector encapsulates the
 functions used as arguments to collect(Remote.Supplier,
 Remote.BiConsumer, Remote.BiConsumer), allowing for reuse of collection
 strategies and composition of collect operations such as multiple-level
 grouping or partitioning.
 
 If the stream is parallel, and the Collector is concurrent, and either the stream
 is unordered or the collector is unordered, then a concurrent reduction will be performed (see RemoteCollector for details on concurrent reduction.)
 
This is a terminal operation.
R - the type of the resultA - the intermediate accumulation type of the Collectorcollector - the Collector describing the reductioncollect(Remote.Supplier, Remote.BiConsumer, Remote.BiConsumer)Optional<T> min(Comparator<? super T> comparator)
Comparator.  This is a special case of a reduction.
 This is a terminal operation.
default Optional<T> min(Remote.Comparator<? super T> comparator)
Comparator.  This is a special case of a reduction.
 This is a terminal operation.
comparator - a non-interfering, stateless Comparator to
                   compare elements of this streamOptional describing the minimum element of this
 stream, or an empty Optional if the stream is emptydefault <U> Optional<T> min(ValueExtractor<? super U,? extends Comparable> extractor)
ValueExtractor. This is a special case of a reduction.
 This is a terminal operation.
U - a super type of the value to extract fromextractor - a non-interfering, stateless
                  ValueExtractor to be used to extract the attribute
                  that should be used to compare stream elementsOptional describing the minimum element of this
 stream, or an empty Optional if the stream is emptyOptional<T> max(Comparator<? super T> comparator)
Comparator.  This is a special case of a reduction.
 This is a terminal operation.
default Optional<T> max(Remote.Comparator<? super T> comparator)
Comparator.  This is a special case of a reduction.
 This is a terminal operation.
comparator - a non-interfering, stateless Comparator to
                   compare elements of this streamOptional describing the maximum element of this
 stream, or an empty Optional if the stream is emptydefault <U> Optional<T> max(ValueExtractor<? super U,? extends Comparable> extractor)
ValueExtractor. This is a special case of a reduction.
 This is a terminal operation.
U - a super type of the value to extract fromextractor - a non-interfering, stateless
                  ValueExtractor to be used to extract the attribute
                  that should be used to compare stream elementsOptional describing the maximum element of this
 stream, or an empty Optional if the stream is emptylong count()
     return mapToLong(e -> 1L).sum();
 
 This is a terminal operation.
boolean anyMatch(Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
default boolean anyMatch(Remote.Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
predicate - a non-interfering, stateless predicate to apply to
                  elements of this streamtrue if any elements of the stream match the provided
 predicate, otherwise falseboolean allMatch(Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
default boolean allMatch(Remote.Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
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 falseboolean noneMatch(Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
default boolean noneMatch(Remote.Predicate<? super T> predicate)
This is a short-circuiting terminal operation.
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 falseOptional<T> findFirst()
Optional describing the first element of this stream,
 or an empty Optional if the stream is empty.  If the stream has
 no encounter order, then any element may be returned.
 This is a short-circuiting terminal operation.
findFirst in interface Stream<T>Optional describing the first element of this stream,
 or an empty Optional if the stream is emptyNullPointerException - if the element selected is nullOptional<T> findAny()
Optional describing some element of the stream, or an
 empty Optional if the stream is empty.
 This is a short-circuiting terminal operation.
 The behavior of this operation is explicitly nondeterministic; it is free
 to select any element in the stream.  This is to allow for maximal
 performance in parallel operations; the cost is that multiple invocations
 on the same source may not return the same result.  (If a stable result
 is desired, use findFirst() instead.)
findAny in interface Stream<T>Optional describing some element of this stream, or an
 empty Optional if the stream is emptyNullPointerException - if the element selected is nullfindFirst()static <T extends Number> RemoteIntStream toIntStream(RemoteStream<T> stream)
RemoteIntStream.T - the type of input stream elementsstream - the stream of numbersRemoteIntStream instancestatic <T extends Number> RemoteLongStream toLongStream(RemoteStream<T> stream)
RemoteLongStream.T - the type of input stream elementsstream - the stream of numbersRemoteLongStream instancestatic <T extends Number> RemoteDoubleStream toDoubleStream(RemoteStream<T> stream)
RemoteDoubleStream.T - the type of input stream elementsstream - the stream of numbersRemoteDoubleStream instance