Enumeration enum = oplans.elements(); while (enum.hasMoreElements()) { Oplan oplan = (Oplan)enum.nextElement();
Enumeration en = oplans.elements(); while (en.hasMoreElements()) { Oplan oplan = (Oplan)en.nextElement();
  protected void setupSubscriptions() {    selfOrganizations = (IncrementalSubscription) getBlackboardService().subscribe(orgsPredicate);    // If we are rehydrating then this subscription will have things on it    // So restore our private variables    if (myOrganization == null && ! selfOrganizations.isEmpty()) {      myOrganization = getMyOrganization(selfOrganizations.elements());      if (myOrganization != null) {	clusterId = myOrganization.getClusterPG().getMessageAddress();      }    }    oplans = (IncrementalSubscription)getBlackboardService().subscribe(new OplanPredicate());    // If there are oplans on our subscription, then restore the    // private hashes / subscriptions    // Note the assumption that there will be an Oplan object before or    // at least at same time as there are OrgActivities and therefore    // LogOplans.    if (! oplans.isEmpty()) {      if (logger.isInfoEnabled())	logger.info(getAgentIdentifier() + ".setupSub: have oplans. Restoring hashes.");      // Restore org activities subscriptions / hash      Enumeration enum = oplans.elements();      while (enum.hasMoreElements()) {	Oplan oplan = (Oplan)enum.nextElement();	UID oplanUID = oplan.getUID();	IncrementalSubscription oplanActivities = (IncrementalSubscription)	  orgActivitySubscriptionOfOPlanUID.get(oplanUID);	if (oplanActivities == null) {	  oplanActivities = (IncrementalSubscription)	    getBlackboardService().subscribe(new OplanOrgActivitiesPredicate(oplanUID));	  orgActivitySubscriptionOfOPlanUID.put(oplanUID, oplanActivities);	}        // publish code was here      }      // Restore LogOplan hash      // If there are none on the blackboard, then wait for the execute      // method of this Plugin to fire on new OrgActivities,      // and create one.      Collection c = getBlackboardService().query(logisticsOPlanPredicate);      for (Iterator i = c.iterator(); i.hasNext(); ) {	LogisticsOPlan loplan = (LogisticsOPlan) i.next();	oplanHash.put(loplan.getOplanUID(), loplan);      }            // If there already are OrgActivities on the subscriptions we just      // restored above, but we have not yet created the LogOplans      // to got with them, then create them here.      // This may not strictly be necessary, but it doesn't hurt      publishLogOplanObjects();    } // end of check for oplans on subscription