Example #1
0
 private int count(String bibNbr, String boatClass) {
   int count = 0;
   for (BoatEntry boat : startList) {
     if (boat.getRacer().getBibNumber().trim().compareTo(bibNbr.trim()) == 0
         && boat.getBoatClass().compareTo(boatClass) == 0) {
       count++;
     }
   }
   return count;
 }
Example #2
0
  public String lookForDuplicateBibsInTheSameClass() {
    String returnString = null;
    for (BoatEntry boat : startList) {
      if (count(boat.getRacer().getBibNumber(), boat.getBoatClass()) > 1) {

        returnString =
            "Bib number "
                + boat.getRacer().getBibNumber()
                + " occurs more than once in "
                + boat.getBoatClass();
        System.out.println(returnString);
        log.warn(returnString);
      }
    }
    return (returnString);
  }
Example #3
0
  private boolean sameRun(RaceRun ourRun, RaceRun otherRun) {
    boolean same = false;
    BoatEntry b;
    Racer racer;
    String bib;
    try {
      b = ourRun.getBoat();
      racer = b.getRacer();
      bib = racer.getBibNumber();

      if (bib.compareTo(otherRun.getBoat().getRacer().getBibNumber()) == 0) {
        if (ourRun.getRunNumber() == otherRun.getRunNumber()) {
          same = true;
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    return (same);
  }
Example #4
0
  private boolean sameRun(RaceRun ourRun, PhotoCellRaceRun otherRun) {
    boolean same = false;
    BoatEntry b;
    Racer racer;
    String bib;
    try {
      b = ourRun.getBoat();
      racer = b.getRacer();
      bib = racer.getBibNumber();

      if (bib.compareTo(otherRun.getBibNumber()) == 0) {
        // We only want to store real time Tag Heuer electronic eye times
        // with the current run
        if (ourRun.getRunNumber() == otherRun.getRunNumber()) {
          same = true;
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    return (same);
  }
Example #5
0
 private String whoIs(String bibNbr, String boatClass) {
   String who = "";
   for (BoatEntry boat : startList) {
     if (boat.getRacer().getBibNumber().trim().compareTo(bibNbr.trim()) == 0
         && boat.getBoatClass().compareTo(boatClass) == 0) {
       who =
           boat.getRacer().getBibNumber()
               + " "
               + boat.getBoatClass()
               + " "
               + boat.getRacer().getShortName();
     }
   }
   return who;
 }