Exemplo n.º 1
0
 public static Set<String> getOperators() {
   Set<String> set = new HashSet<>();
   for (NaryOperation exp : values()) {
     set.add(exp.getOperator());
   }
   return set;
 }
Exemplo n.º 2
0
 public static boolean contains(String operator) {
   for (NaryOperation e : values()) {
     if (e.getOperator().equalsIgnoreCase(operator)) {
       return true;
     }
   }
   return false;
 }