public boolean isFirstGateInSection(int iGate) { for (JudgingSection s : judgingSections) { if (iGate == s.getFirstGate()) { return true; } } return false; }
public boolean isGateInSection(int iGate, int section) { if (section == 0) { // All Sections are represented by 0 /// fixme kludge return true; } int currSection = 1; for (JudgingSection s : judgingSections) { if (section == currSection) { if (iGate >= s.getFirstGate() && iGate <= s.getLastGate()) { // System.out.println(iGate + " is in section " + section); return true; } } currSection++; } // System.out.println(iGate + " is NOT in section " + section); return false; }