@SuppressWarnings("unchecked") public E nextElement() { if (!hasMoreElements()) { throw new NoSuchElementException(); } return (E) enumerations[index].nextElement(); }
public Enumeration<URL> getResources(String name) throws IOException { Enumeration[] resources = new Enumeration[2]; resources[0] = getParent().getResources(name); resources[1] = findResources(name); return new CompositeEnumeration<>(resources); }