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; }
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; }