allTargets.add(targets.nextElement());
Organization o = (Organization) targets.nextElement(); allTargets.add(o); if (logger.isDebugEnabled()) { logger.debug("New or Changed Org is: "+ o); }
  private void distributeCheckOrgs(Enumeration policies, Enumeration targets){    if (logger.isDebugEnabled()) {      logger.debug("in checkOrgs");    }    Vector allTargets = new Vector();    while (targets.hasMoreElements()){      allTargets.add(targets.nextElement());    }    Vector goodTargets = new Vector();    while ( policies.hasMoreElements() ) {      LogisticsPolicy lp = (LogisticsPolicy) policies.nextElement();      MutableTimeSpan mts = new MutableTimeSpan ();      Enumeration t = allTargets.elements();      while (t.hasMoreElements()){        Organization org = (Organization) t.nextElement();        Collection sups = org.getSuperiors(mts.getStartTime(), mts.getEndTime()); //assume subordinates are what we are matching for now        if (logger.isDebugEnabled()) {          logger.debug("Test: " + org.getMessageAddress() + " sups: " + sups.toString());        }        for(Iterator i = sups.iterator(); i.hasNext();){          RelationshipImpl ri = (RelationshipImpl) i.next();          Organization oa = (Organization) ri.getA();          Organization ob = (Organization) ri.getB();          if (oa.equals(myOrganization_) || ob.equals(myOrganization_)) {            goodTargets.add(org);          }        }      }      distribute(lp, goodTargets.elements());    }  }