예제 #1
0
 public static boolean perform(String multiFxString, Location location) {
   List<Entry<Fx, String>> fxDatas = Fx.parseMultiFxString(multiFxString);
   if (Fx.parseMultiErrors.size() != 0) return false;
   for (Entry<Fx, String> fxData : fxDatas) {
     Fx.perform(fxData.getKey(), fxData.getValue(), location);
   }
   return true;
 }
예제 #2
0
 public static List<Fx> match(String str) {
   List<Fx> ret = new ArrayList<Fx>();
   str = str.toLowerCase().replace("_", "").replace("-", "");
   for (Fx fx : Fx.values()) {
     for (String alias : fx.aliases) {
       if (alias.startsWith(str)) {
         ret.add(fx);
         break;
       }
     }
   }
   return ret;
 }