Collection results = null; for (int i = 0; i < clusterURLs.size(); i++) { Collection tmp = getCollectionFromCluster((String)clusterURLs.elementAt(i), PSP_id, filter); if (results == null) { results = tmp; } else if (tmp != null) { try { results.addAll(tmp); } catch (Exception e) { System.out.println(e); } } } return results;
return getCollectionFromClusters(clusterURLs, PSP_id, filter, -1);
  public static Collection getCollectionFromClusters(Vector clusterURLs,						     String PSP_id,						     String filter) {    Collection results = null;    for (int i = 0; i < clusterURLs.size(); i++) {      Collection tmp = 	getCollectionFromCluster((String)clusterURLs.elementAt(i), 				 PSP_id, filter);      if (results == null) {	results = tmp;      } else if (tmp != null) {	try {	  results.addAll(tmp);	} catch (Exception e) {	  System.out.println(e);	}      }    }    return results;  }