Wildcards and generics error
<p>The code below is throwaway, a failed idea to get an Enumeration to work in the new foreach loop, however I'd like to get it compiling since I keep running into an issue with generics and wild cards.  For whatever reason I cannot see how to fix it.  </p>

<p>So, what changes need to be made to make this compile?</p>

<pre><code>import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;


public class Main
{
    private ZipFile zipFile;

    public Set&lt;String&gt; entries()
    {
        final Set&lt;String&gt;                             names;
        final Enumeration&lt;? extends ZipEntry&gt;         enumeration;
        final IterableEnumeration&lt;? extends ZipEntry&gt; iteratable;

        names = new HashSet&lt;String&gt;();

        // zipFile.entries() returns "Enumeration&lt;? extends ZipEntry&gt;"
        enumeration = zipFile.entries();

        // this line won't compile
        iteratable  = new IterableEnumeration&lt;? extends ZipEntry&gt;(enumeration);

        for(final ZipEntry entry : iteratable)
        {
            if(!(entry.isDirectory()))
            {
                names.add(entry.getName());
            }
        }

        return (names);
    }
}

class IterableEnumeration&lt;T&gt;
    implements Iterable&lt;T&gt;
{
    private final Enumeration&lt;T&gt; enumeration;

    public IterableEnumeration(final Enumeration&lt;T&gt; e)
    {
        enumeration = e;
    }

    public Iterator&lt;T&gt; iterator()
    {
        final EnumerationIterator&lt;T&gt; iterator;

        // yeah cannot do this since an Iterable is supposed to work multiple times on the same object and Enumeration is descructive...
        iterator = new EnumerationIterator&lt;T&gt;(enumeration);

        return (iterator);
    }
}

class EnumerationIterator&lt;T&gt;
    implements Iterator&lt;T&gt;
{
    private final Enumeration&lt;T&gt; enumeration;

    public EnumerationIterator(final Enumeration&lt;T&gt; e)
    {
        enumeration = e;
    }

    public boolean hasNext()
    {
        return (enumeration.hasMoreElements());
    }

    public T next()
    {
        return (enumeration.nextElement());
    }

    public void remove()
    {
        throw new UnsupportedOperationException("Cannt remove via an Enumeration");
    }
}
</code></pre>

<p>The error is:</p>

<pre><code>Main.java:26: unexpected type
found   : ? extends java.util.zip.ZipEntry
required: class or interface without bounds
        iteratable  = new IterableEnumeration&lt;? extends ZipEntry&gt;(enumeration);
                                             ^
1 error
</code></pre>
