Package org.keycloak.models.map.common
Class StreamUtils
- java.lang.Object
-
- org.keycloak.models.map.common.StreamUtils
-
public class StreamUtils extends Object
- Author:
- hmlnarik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamUtils.AbstractToPairSpliterator<K,V,M>
static class
StreamUtils.Pair<T1,T2>
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.
-
-
-
Method Detail
-
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:
-
-