/** * Adds to the list a function converting the input type in to the output type if they are not the same. * * @param functions the list to add to * @param inputType the input type * @param outputType the output type * @param converter the function use to convert the input type into the output type */ private static <I, O> void addFunctionIfNeeded(List<Function> functions, AbstractType<I> inputType, AbstractType<O> outputType, java.util.function.Function<I, O> converter) { if (!inputType.equals(outputType)) functions.add(wrapJavaFunction(inputType, outputType, converter)); }
/** * Adds to the list a function converting the input type in to the output type if they are not the same. * * @param functions the list to add to * @param inputType the input type * @param outputType the output type * @param converter the function use to convert the input type into the output type */ private static <I, O> void addFunctionIfNeeded(List<Function> functions, AbstractType<I> inputType, AbstractType<O> outputType, java.util.function.Function<I, O> converter) { if (!inputType.equals(outputType)) functions.add(wrapJavaFunction(inputType, outputType, converter)); }
/** * Adds to the list a function converting the input type in to the output type if they are not the same. * * @param functions the list to add to * @param inputType the input type * @param outputType the output type * @param converter the function use to convert the input type into the output type */ private static <I, O> void addFunctionIfNeeded(List<Function> functions, AbstractType<I> inputType, AbstractType<O> outputType, java.util.function.Function<I, O> converter) { if (!inputType.equals(outputType)) functions.add(wrapJavaFunction(inputType, outputType, converter)); }