Set messageIDs = getUndelivered(); Set s = new HashSet(); for(Iterator i = messageIDs.iterator(); i.hasNext(); ) { Routable r = (Routable)messages.get(i.next()); if (r != null) { s.add(r); } } return s;
return browse(null);
   public Set browse()   {      // TODO Very inefficient implementation, change it      Set messageIDs = getUndelivered();      Set s = new HashSet();      for(Iterator i = messageIDs.iterator(); i.hasNext(); )      {         Routable r = (Routable)messages.get(i.next());         if (r != null)         {            s.add(r);         }      }      return s;   }