Java tutorial
//package com.java2s; public class Main { public static final String[] SUPPORTED_FUNCS = new String[] { "SUM", "MIN", "MAX", "COUNT" }; public static final String UDF_AGR_FUNC_PAILLIER = "Paillier_agr"; public static final String UDF_AGR_FUNC_ELGAMAL = "ECElGamal_Agr"; /** * Checks if the String representation of a Function * is of type SUM * @param in Func as String * @return true or false */ public static boolean isUDFSUMorSUM(String in) { return in.equals(UDF_AGR_FUNC_PAILLIER) || in.equals(UDF_AGR_FUNC_ELGAMAL) || in.toUpperCase().equals(SUPPORTED_FUNCS[0]); } }