| Modifier and Type | Method and Description |
|---|---|
static <S,K,V> Stream<V> |
streamByIndex(S source,
IntStream indexes,
ObjIntFunction<S,V> resolveValue)
Stream the elements from a container which allows access to the by through an
int index, but does not itself
offer any means for traversal/iteration/streaming. |
static <S,K,V> Stream<V> |
streamByIndex(S source,
LongStream indexes,
ObjLongFunction<S,V> resolveValue)
Stream the elements from a container which allows access to the by through a
long index, but does not itself
offer any means for traversal/iteration/streaming. |
static <S,V> Stream<V> |
streamByIntIndex(S source,
int endExclusive,
ObjIntFunction<S,V> resolveValue)
Stream the elements from a container which allows access to the elements by an
int index, but does not itself
offer any means for traversal/iteration/streaming. |
static <S,K,V> Stream<V> |
streamByKey(S source,
Stream<K> keys,
BiFunction<S,K,V> resolveValue)
Stream the elements from a container which allows access to the by through a key, but does not itself
offer any means for traversal/iteration/streaming.
|
static <S,V> Stream<V> |
streamByLongIndex(S source,
long endExclusive,
ObjLongFunction<S,V> resolveValue)
Stream the elements from a container which allows access to the elements by a
long index, but does not itself
offer any means for traversal/iteration/streaming. |
static <P> Stream<P> |
streamPages(IntFunction<P> resolvePage,
Predicate<? super P> includeWhile)
Generate a stream of objects resolved from an incrementing int (page number), while a predicate is accepting
the resolved objects.
|
static <P> Stream<P> |
streamPages(int firstPageNum,
IntFunction<P> resolvePage,
Predicate<? super P> includeWhile)
Generate a stream of objects resolved from an incrementing int (page number), while a predicate is accepting
the resolved objects.
|
static <E> Stream<E> |
streamWhileNonEmpty(IntFunction<? extends Collection<E>> resolveCollection)
Stream elements retrieved from resolved collections while they are non-empty.
|
public static final <S,V> Stream<V> streamByIntIndex(S source, int endExclusive, ObjIntFunction<S,V> resolveValue)
int index, but does not itself
offer any means for traversal/iteration/streaming. This method will stream all elements from index 0 up to,
but not including, the given endExclusive index.V - The type of the resolved elements yielded by the Stream.S - The type of the source object which yields elements of type V by index.source - The source object which yields the elements by an indexendExclusive - The end index. This is also effectively the resulting size of the streamresolveValue - How to query the source object for each index. This can usually be a method
reference like S::get or similar.public static final <S,K,V> Stream<V> streamByIndex(S source, IntStream indexes, ObjIntFunction<S,V> resolveValue)
int index, but does not itself
offer any means for traversal/iteration/streaming. This method will stream the elements with indexes from
the given IntStream.V - The type of the resolved elements yielded by the Stream.S - The type of the source object which yields elements of type V by index.source - The source object which yields the elements by an indexindexes - The indexesresolveValue - How to query the source object for each index. This can usually be a method
reference like S::get or similar.public static final <S,V> Stream<V> streamByLongIndex(S source, long endExclusive, ObjLongFunction<S,V> resolveValue)
long index, but does not itself
offer any means for traversal/iteration/streaming. This method will stream all elements from index 0 up to,
but not including, the given endExclusive index.V - The type of the resolved elements yielded by the Stream.S - The type of the source object which yields elements of type V by index.source - The source object which yields the elements by an indexendExclusive - The end index. This is also effectively the resulting size of the streamresolveValue - How to query the source object for each index. This can usually be a method
reference like S::get or similar.public static final <S,K,V> Stream<V> streamByIndex(S source, LongStream indexes, ObjLongFunction<S,V> resolveValue)
long index, but does not itself
offer any means for traversal/iteration/streaming. This method will stream the elements with indexes from
the given IntStream.V - The type of the resolved elements yielded by the Stream.S - The type of the source object which yields elements of type V by index.source - The source object which yields the elements by an indexindexes - The indexesresolveValue - How to query the source object for each index. This can usually be a method
reference like S::get or similar.public static final <S,K,V> Stream<V> streamByKey(S source, Stream<K> keys, BiFunction<S,K,V> resolveValue)
Stream<K>.V - The type of the resolved elements yielded by the Stream.S - The type of the source object which yields elements of type V by key.K - The type of the key used to query elements of type V.source - The source object which yields the elements by a keykeys - The keysresolveValue - How to query the source object for each key. This can usually be a method
reference like S::get or similar.public static <E> Stream<E> streamWhileNonEmpty(IntFunction<? extends Collection<E>> resolveCollection)
E - The type of the elements in the resolved collections, and elements in the resulting streamresolveCollection - a function accepting an int indicating the page number and returns a Collection with
elements to include in the resulting streampublic static <P> Stream<P> streamPages(IntFunction<P> resolvePage, Predicate<? super P> includeWhile)
resolvePage - a function accepting an int indicating the page number and returns a page to include
in the resulting streamincludeWhile - the predicate accepting the objects to include in the streampublic static <P> Stream<P> streamPages(int firstPageNum, IntFunction<P> resolvePage, Predicate<? super P> includeWhile)
firstPageNum - the initial page numberresolvePage - a function accepting an int indicating the page number and returns a page to include
in the resulting streamincludeWhile - the predicate accepting the objects to include in the streamCopyright © 2019 Digipost. All rights reserved.