diff options
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/iterators/EnumerationIterator.java')
-rw-r--r-- | common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/iterators/EnumerationIterator.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/iterators/EnumerationIterator.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/iterators/EnumerationIterator.java deleted file mode 100644 index d8e9d38e25..0000000000 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/iterators/EnumerationIterator.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.common.utility.internal.iterators; - -import java.util.Enumeration; -import java.util.Iterator; -import org.eclipse.jpt.common.utility.internal.StringTools; - -/** - * An <code>EnumerationIterator</code> wraps an - * {@link Enumeration} so that it can be treated like an - * {@link Iterator}. - * - * @param <E> the type of elements returned by the iterator - */ -public class EnumerationIterator<E> - implements Iterator<E> -{ - private final Enumeration<? extends E> enumeration; - - /** - * Construct an iterator that wraps the specified enumeration. - */ - public EnumerationIterator(Enumeration<? extends E> enumeration) { - this.enumeration = enumeration; - } - - public boolean hasNext() { - return this.enumeration.hasMoreElements(); - } - - public E next() { - return this.enumeration.nextElement(); - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public String toString() { - return StringTools.buildToStringFor(this, this.enumeration); - } - -} |