@@ -0,0 +1,2528 @@
+/*%0A * Copyright (c) 2014, peelo.net%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are met:%0A *%0A * * Redistributions of source code must retain the above copyright notice, this%0A * list of conditions and the following disclaimer.%0A *%0A * * Redistributions in binary form must reproduce the above copyright notice,%0A * this list of conditions and the following disclaimer in the documentation%0A * and/or other materials provided with the distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22%0A * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE%0A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE%0A * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE%0A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL%0A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR%0A * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER%0A * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,%0A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0Apackage net.peelo.iterator;%0A%0Aimport java.util.Enumeration;%0Aimport java.util.Iterator;%0A%0A/**%0A * Wrapper class which turns an %7B@link Enumeration%7D into %7B@link Iterator%7D.%0A */%0Apublic final class EnumerationIterator%3CE%3E implements Iterator%3CE%3E%0A%7B%0A    /** The wrapped %7B@link Enumeration%7D. */%0A    private final Enumeration%3CE%3E enumeration;%0A%0A    /**%0A     * Constructs new %7B@link EnumerationIterator%7D.%0A     *%0A     * @param enumeration The wrapped %7B@link Enumeration%7D%0A     * @throws NullPointerException If given %7B@link Enumeration%7D is%0A     *         %7B@code null%7D%0A     */%0A    public EnumerationIterator(Enumeration%3CE%3E enumeration)%0A    %7B%0A        if (enumeration == null)%0A        %7B%0A            throw new NullPointerException();%0A        %7D%0A        this.enumeration = enumeration;%0A    %7D%0A%0A    @Override%0A    public boolean hasNext()%0A    %7B%0A        return this.enumeration.hasMoreElements();%0A    %7D%0A%0A    @Override%0A    public E next()%0A    %7B%0A        return this.enumeration.nextElement();%0A    %7D%0A%0A    /**%0A     * Unsupported operation.%0A     *%0A     * @throws UnsupportedOperationException%0A     */%0A    @Override%0A    public void remove()%0A    %7B%0A        throw new UnsupportedOperationException();%0A    %7D%0A%7D%0A

add Enumeration->Iterator wrapper