Package org.keycloak.models.map.common
Class StreamUtils
java.lang.Object
org.keycloak.models.map.common.StreamUtils
- Author:
- hmlnarik
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static final class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> Stream<StreamUtils.Pair<K, V>> leftInnerJoinIterable
(Stream<K> stream, Function<? super K, ? extends Iterable<V>> mapper) Creates a stream of pairs that join two streams.static <K,
V> Stream<StreamUtils.Pair<K, V>> leftInnerJoinStream
(Stream<K> stream, Function<? super K, Stream<V>> mapper) Creates a stream of pairs that join two streams.
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
leftInnerJoinStream
public static <K,V> Stream<StreamUtils.Pair<K,V>> leftInnerJoinStream(Stream<K> stream, Function<? super K, Stream<V>> mapper) Creates a stream of pairs that join two streams. For each element k from thestream
and each element v obtained from the stream returned by themapper
for k, generates a stream of pairs (k, v).Effectively performs equivalent of a
LEFT INNER JOIN
SQL operation on streams.- Type Parameters:
K
-V
-- Parameters:
stream
-mapper
-- Returns:
-
leftInnerJoinIterable
public static <K,V> Stream<StreamUtils.Pair<K,V>> leftInnerJoinIterable(Stream<K> stream, Function<? super K, ? extends Iterable<V>> mapper) Creates a stream of pairs that join two streams. For each element k from thestream
and each element v obtained from theIterable
returned by themapper
for k, generates a stream of pairs (k, v).Effectively performs equivalent of a
LEFT INNER JOIN
SQL operation on streams.- Type Parameters:
K
-V
-- Parameters:
stream
-mapper
-- Returns:
-