throw new RuntimeException(String.format("Class %s not supported", clazz.getSimpleName()));
}
public static Binary getMinFunction(final Class<?> clazz) {
return new Binary() {
public Object f(Object t1, Object t2) {
if (isInteger(clazz))
return Math.min((Integer)t1, (Integer)t2);
if (isLong(clazz))
return Math.min((Long)t1, (Long)t2);