コード例 #1
0
 private Mode getTheSameMode(Model model, Mode sample) {
   m:
   for (Mode m : model.getModes()) {
     for (Variable v : m.getVars()) {
       if (v.getVaries()) {
         Variable v_ = findByName(sample.getVars(), v.getName());
         if (!(v.getVariation() == v_.getVariation())) continue m;
       }
     }
     return m;
   }
   return null;
 }
コード例 #2
0
 private Variable findByName(List<Variable> list, String name) {
   for (Variable v : list) {
     if (v.getName().equals(name)) return v;
   }
   return null;
 }