Should we put behaviors (method) in constant class in Java? If not then why? Which clean code practice/principle I am breaking while doing that?
public class TagConstants {
public static final String O_NAME = "oName";
public static final String O_TYPE = "oType";
public static final String S_TYPE = "sType";
public static final String V_CATEGORY = "vCategory"; // 50 more final strings
public static boolean abc(String type){
if(O_TYPE.equals(type) || S_TYPE.equals(type)){
return true;
}
}