Exemplo n.º 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));
   }
 }
Exemplo n.º 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;
  }