Class MappingBuilder
java.lang.Object
com.fluxtion.ext.streaming.builder.factory.MappingBuilder
public class MappingBuilder
extends java.lang.Object
Provides helper methods to build mapping functions from nodes and Events.
- Author:
- Greg Higgins [email protected]
-
Constructor Summary
Constructors Constructor Description MappingBuilder()
-
Method Summary
Modifier and Type Method Description static <R> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.MethodReferenceReflection test, com.fluxtion.ext.streaming.api.stream.Argument... args)
Build a mapping function with nary inputsstatic <E1, E2, R, S, U>
com.fluxtion.ext.streaming.api.Wrapper<R>map(com.fluxtion.api.partition.LambdaReflection.SerializableBiFunction<? super U,? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2)
static <R, S, U> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.SerializableBiFunction<? super U,? super S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2)
static <T, R, S> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<T,? extends S> supplier)
static <T, R, S> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableSupplier<? extends S> supplier)
static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg1)
static <E1, E2, E3, E4, R, S, U, T, V>
com.fluxtion.ext.streaming.api.Wrapper<R>map(com.fluxtion.api.partition.LambdaReflection.SerializableQuadFunction<? super U,? super S,? super T,? super V,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E3,? extends T> supplier3, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E4,? extends V> supplier4)
static <R, S, U, T, V>
com.fluxtion.ext.streaming.api.Wrapper<R>map(com.fluxtion.api.partition.LambdaReflection.SerializableQuadFunction<? super U,? super S,? super T,? super V,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg3, com.fluxtion.ext.streaming.api.stream.Argument<? extends T> arg4)
static <E1, E2, E3, R, S, U, T>
com.fluxtion.ext.streaming.api.Wrapper<R>map(com.fluxtion.api.partition.LambdaReflection.SerializableTriFunction<? super U,? super S,? super T,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E3,? extends T> supplier3)
static <R, S, U, T> com.fluxtion.ext.streaming.api.Wrapper<R>
map(com.fluxtion.api.partition.LambdaReflection.SerializableTriFunction<? super U,? super S,? super T,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2, com.fluxtion.ext.streaming.api.stream.Argument<? extends T> arg3)
static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R>
mapSet(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument... suppliers)
Maps a set of nodes with a single mapping function.static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R>
mapSetOnUpdate(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableSupplier<S>... suppliers)
Maps a set of nodes with a mapping function.
-
Constructor Details
-
MappingBuilder
public MappingBuilder()
-
-
Method Details
-
map
public static <R> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.MethodReferenceReflection test, com.fluxtion.ext.streaming.api.stream.Argument... args)Build a mapping function with nary inputs- Type Parameters:
R
- The output type of the mapping function- Parameters:
test
- the test function to applyargs
- the input arguments for the mapping function- Returns:
- the output of the function as
Wrapper
stream
-
map
public static <T, R, S> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<T,? extends S> supplier) -
map
public static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg1) -
map
public static <T, R, S> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableSupplier<? extends S> supplier) -
map
public static <R, S, U> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableBiFunction<? super U,? super S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2) -
map
public static <E1, E2, R, S, U> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableBiFunction<? super U,? super S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2) -
map
public static <R, S, U, T> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableTriFunction<? super U,? super S,? super T,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2, com.fluxtion.ext.streaming.api.stream.Argument<? extends T> arg3) -
map
public static <E1, E2, E3, R, S, U, T> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableTriFunction<? super U,? super S,? super T,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E3,? extends T> supplier3) -
map
public static <R, S, U, T, V> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableQuadFunction<? super U,? super S,? super T,? super V,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument<? extends U> arg1, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg2, com.fluxtion.ext.streaming.api.stream.Argument<? extends S> arg3, com.fluxtion.ext.streaming.api.stream.Argument<? extends T> arg4) -
map
public static <E1, E2, E3, E4, R, S, U, T, V> com.fluxtion.ext.streaming.api.Wrapper<R> map(com.fluxtion.api.partition.LambdaReflection.SerializableQuadFunction<? super U,? super S,? super T,? super V,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E1,? extends U> supplier1, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E2,? extends S> supplier2, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E3,? extends T> supplier3, com.fluxtion.api.partition.LambdaReflection.SerializableFunction<E4,? extends V> supplier4) -
mapSet
public static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R> mapSet(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<S,R> mapper, com.fluxtion.ext.streaming.api.stream.Argument... suppliers)Maps a set of nodes with a single mapping function. The function will consult each node on every update.- Type Parameters:
R
-S
-- Parameters:
mapper
-suppliers
-- Returns:
-
mapSetOnUpdate
public static <R, S> com.fluxtion.ext.streaming.api.Wrapper<R> mapSetOnUpdate(com.fluxtion.api.partition.LambdaReflection.SerializableFunction<S,R> mapper, com.fluxtion.api.partition.LambdaReflection.SerializableSupplier<S>... suppliers)Maps a set of nodes with a mapping function. Only nodes that notify in the current execution path are included in the mapping function.- Type Parameters:
R
-S
-- Parameters:
mapper
-suppliers
-- Returns:
-