- java.lang.Object
-
- io.virtdata.core.DataMapperFunctionMapper
-
public class DataMapperFunctionMapper extends java.lang.ObjectThis class implements an obtuse way of avoiding autoboxing and M:N type mapping complexity by way of doublish dispatch. It was preferred over a more generalized reflection and annotation-based approach. If it gets too verbose, (for some definition of "too"), then it may be refactored.
The primary goal of this approach is to allow for primitive-level lambdas when function are composed together. This will allow for significant performance gains when there are only a few steps in a composed function which are non-primitive, which is the general case.
Composition should be supported between all primitive functions for types listed in TypeMap, as well as generic functions, with generic functions as the last resort.
-
-
Constructor Summary
Constructors Constructor Description DataMapperFunctionMapper()
-
Method Summary
Modifier and Type Method Description static <T> DataMapper<T>map(java.lang.Object function)static <R> DataMapper<R>map(java.util.function.DoubleFunction<R> f)static DataMapper<java.lang.Integer>map(java.util.function.DoubleToIntFunction f)static DataMapper<java.lang.Long>map(java.util.function.DoubleToLongFunction f)static DataMapper<java.lang.Double>map(java.util.function.DoubleUnaryOperator f)static <R> DataMapper<R>map(java.util.function.Function<java.lang.Long,R> f)static <R> DataMapper<R>map(java.util.function.IntFunction<R> f)static DataMapper<java.lang.Long>map(java.util.function.IntToDoubleFunction f)static DataMapper<java.lang.Long>map(java.util.function.IntToLongFunction f)static DataMapper<java.lang.Integer>map(java.util.function.IntUnaryOperator f)static <R> DataMapper<R>map(java.util.function.LongFunction<R> f)static DataMapper<java.lang.Double>map(java.util.function.LongToDoubleFunction f)static DataMapper<java.lang.Integer>map(java.util.function.LongToIntFunction f)static DataMapper<java.lang.Long>map(java.util.function.LongUnaryOperator f)
-
-
-
Method Detail
-
map
public static <T> DataMapper<T> map(java.lang.Object function)
-
map
public static <R> DataMapper<R> map(java.util.function.DoubleFunction<R> f)
-
map
public static DataMapper<java.lang.Integer> map(java.util.function.DoubleToIntFunction f)
-
map
public static DataMapper<java.lang.Long> map(java.util.function.DoubleToLongFunction f)
-
map
public static DataMapper<java.lang.Double> map(java.util.function.DoubleUnaryOperator f)
-
map
public static <R> DataMapper<R> map(java.util.function.IntFunction<R> f)
-
map
public static DataMapper<java.lang.Long> map(java.util.function.IntToDoubleFunction f)
-
map
public static DataMapper<java.lang.Long> map(java.util.function.IntToLongFunction f)
-
map
public static DataMapper<java.lang.Integer> map(java.util.function.IntUnaryOperator f)
-
map
public static DataMapper<java.lang.Double> map(java.util.function.LongToDoubleFunction f)
-
map
public static DataMapper<java.lang.Integer> map(java.util.function.LongToIntFunction f)
-
map
public static DataMapper<java.lang.Long> map(java.util.function.LongUnaryOperator f)
-
map
public static <R> DataMapper<R> map(java.util.function.LongFunction<R> f)
-
map
public static <R> DataMapper<R> map(java.util.function.Function<java.lang.Long,R> f)
-
-