Package org.hivedb.util.functional

Examples of org.hivedb.util.functional.Binary


    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);
View Full Code Here


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

TOP

Related Classes of org.hivedb.util.functional.Binary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.