Java tutorial
public class Main { public static void main(String... args) { Converter<String, Integer> integerConverter1 = (from) -> Integer.valueOf(from); Integer converted1 = integerConverter1.convert("123"); System.out.println(converted1); // result: 123 } } @FunctionalInterface interface Converter<F, T> { T convert(F from); }