Package io.virtdata.util
Class VirtDataFunctions
- java.lang.Object
-
- io.virtdata.util.VirtDataFunctions
-
public class VirtDataFunctions extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description VirtDataFunctions()
-
Method Summary
Modifier and Type Method Description static <F> Fadapt(java.lang.Object func, java.lang.Class<F> type, java.lang.Class<?> output, boolean truncate)Adapt a functional object into a different type of functional object.
-
-
-
Method Detail
-
adapt
public static <F> F adapt(java.lang.Object func, java.lang.Class<F> type, java.lang.Class<?> output, boolean truncate)Adapt a functional object into a different type of functional object.- Type Parameters:
F- The type of function object needed.- Parameters:
func- The original function object.type- The type of function object needed.output- The output type required for the adapted function.truncate- Whether to throw an exception on any narrowing conversion. If this is set to false, then basic roll-over logic is applied on narrowing conversions.- Returns:
- An instance of F
-
-