Пример #1
0
 public JudgingSection updateSectionOnline(Integer section) {
   JudgingSection found = null;
   for (JudgingSection js : judgingSections) {
     if (js.getSectionNbr().compareTo(section) == 0) {
       js.setClientDeviceAttached(true);
       found = js;
       break;
     }
   }
   return found;
 }
Пример #2
0
 public String getSectionsConnectedNamesAsString() {
   StringBuffer sb = new StringBuffer();
   boolean first = true;
   for (JudgingSection s : judgingSections) {
     if (s.getClientDeviceAttached()) {
       if (!first) {
         sb.append(",");
       }
       first = false;
       sb.append(s.getSectionNbr());
     }
   }
   if (sb.length() == 0) {
     sb.append(SECTIONS_NONE);
   }
   return sb.toString();
 }