コード例 #1
0
 private Boolean matchFantasmas(String line) {
   Boolean result = Boolean.FALSE;
   Matcher matcher = fantasmasPattern.matcher(line);
   if (matcher.find()) {
     if (Constantes.ZONZO.equals(matcher.group(1))) {
       cantFantasmaZonzo++;
     } else if (Constantes.PEREZOSO.equals(matcher.group(1))) {
       cantFantasmaPerezoso++;
     } else {
       cantFantasmaBuscador++;
     }
     result = Boolean.TRUE;
   }
   return result;
 }
コード例 #2
0
 private Boolean matchDistancias(String line) {
   Boolean result = Boolean.FALSE;
   Matcher matcher = distanciaPattern.matcher(line);
   if (matcher.find()) {
     if (Constantes.ZONZO.equals(matcher.group(1))) {
       this.setDistanciaZonzo(new Integer(matcher.group(2)));
     } else if (Constantes.PEREZOSO.equals(matcher.group(1))) {
       this.setDistanciaPerezoso(new Integer(matcher.group(2)));
     } else {
       this.setDistanciaBuscador(new Integer(matcher.group(2)));
     }
     result = Boolean.TRUE;
   }
   return result;
 }