package fp; /** * Adding two Integers * @author DXN */ public class Add implements ILambda { public static final Add Singleton = new Add(); private Add() { } /** * Adds two Integer. * @param params array of two Integers. * @return Integer */ public Object apply(Object ... params) { return ((Integer)param[0]) + ((Integer)param[1]); } }