/** * Return a comma delimited string representation of all of the elements * in the given Iterator. * * @param iter Iterator to convert to string. * @return Delimited string value. */ public static String toString(final Iterator iter) { return toString(iter, ","); } }
@Override @SuppressWarnings("unchecked") protected Enumeration<URL> findResources(String name) throws IOException { Set<URL> resourceURLs = loadResources(name); return Iterators.toEnumeration(resourceURLs.iterator()); }
@Override @SuppressWarnings("unchecked") protected Enumeration<URL> findResources(String name) throws IOException { Set<URL> resourceURLs = loadResources(name); return Iterators.toEnumeration(resourceURLs.iterator()); }
@SuppressWarnings("unchecked") @Override public Enumeration<URL> getResources(String name) throws IOException { Enumeration<URL> unfiltered = super.getResources(name); List<URL> filtered = new ArrayList<URL>(); while (unfiltered.hasMoreElements()) { URL next = unfiltered.nextElement(); boolean ignore =false; for (String url : urls) { if (next.toString().startsWith(url)) ignore = true; } if (ignore == false) filtered.add(next); } return Iterators.toEnumeration(filtered.iterator()); } }
@SuppressWarnings("unchecked") @Override public Enumeration<URL> getResources(String name) throws IOException { Enumeration<URL> unfiltered = super.getResources(name); List<URL> filtered = new ArrayList<URL>(); while (unfiltered.hasMoreElements()) { URL next = unfiltered.nextElement(); boolean ignore =false; for (String url : urls) { if (next.toString().startsWith(url)) ignore = true; } if (ignore == false) filtered.add(next); } return Iterators.toEnumeration(filtered.iterator()); } }