Java tutorial
//package com.java2s; public class Main { public static final String[] SUPPORTED_FUNCS = new String[] { "SUM", "MIN", "MAX", "COUNT" }; /** * Checks if the function is supported * @param func function in String format * @return */ public static boolean isValidAgrFunction(String func) { String upperFunc = func.toUpperCase(); for (String agrFunc : SUPPORTED_FUNCS) { if (upperFunc.equals(agrFunc)) return true; } return false; } }