Пример #1
0
 /** Initialize the <code>passes</code> field and the <code>passMap</code> field. */
 protected void init() {
   passes = new ArrayList(getPasses());
   passMap = new HashMap();
   for (int i = 0; i < passes.size(); i++) {
     Pass pass = (Pass) passes.get(i);
     passMap.put(pass.id(), new Integer(i));
   }
 }
Пример #2
0
  /**
   * Return the last <code>BarrierPass</code> that this job completed; return <code>null</code> if
   * no <code>BarrierPass</code>es have yet been completed
   */
  public BarrierPass lastBarrier() {
    for (int i = nextPass - 1; i >= 0; i--) {
      Pass pass = (Pass) passes.get(i);

      if (pass instanceof BarrierPass) {
        return (BarrierPass) pass;
      }
    }

    return null;
  }
Пример #3
0
 /**
  * Return a list of passes that still have to be performed. The list returned by <code>
  * completedPasses</code> concatenated with the list returned by <code>pendingPasses</code> should
  * be equivalent to the list returned by <code>passes</code>.
  */
 public List pendingPasses() {
   return passes().subList(nextPass, passes.size());
 }