From 5b9d61cdbde5162cb3f3bf06e9c89e69d52d2771 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Sun, 7 Dec 2003 01:15:36 +0000 Subject: [PATCH] Remove commented out code now replaced with better code git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131415 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/bag/AbstractMapBag.java | 55 +------------------ 1 file changed, 2 insertions(+), 53 deletions(-) diff --git a/src/java/org/apache/commons/collections/bag/AbstractMapBag.java b/src/java/org/apache/commons/collections/bag/AbstractMapBag.java index 91f4a44fc..0cbc7c086 100644 --- a/src/java/org/apache/commons/collections/bag/AbstractMapBag.java +++ b/src/java/org/apache/commons/collections/bag/AbstractMapBag.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java,v 1.4 2003/12/03 11:19:10 scolebourne Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bag/AbstractMapBag.java,v 1.5 2003/12/07 01:15:36 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -79,7 +79,7 @@ import org.apache.commons.collections.set.UnmodifiableSet; * the number of occurrences of that element in the bag. * * @since Commons Collections 3.0 - * @version $Revision: 1.4 $ $Date: 2003/12/03 11:19:10 $ + * @version $Revision: 1.5 $ $Date: 2003/12/07 01:15:36 $ * * @author Chuck Burdick * @author Michael A. Smith @@ -212,59 +212,8 @@ public abstract class AbstractMapBag implements Bag { */ public Iterator iterator() { return new BagIterator(this); -// List result = new ArrayList(); -// Iterator i = map.keySet().iterator(); -// while (i.hasNext()) { -// Object current = i.next(); -// for (int index = getCount(current); index > 0; index--) { -// result.add(current); -// } -// } -// return new BagIterator(this, result.iterator()); } -// static class BagIterator implements Iterator { -// private AbstractMapBag parent; -// private Iterator support; -// private Object current; -// private int mods; -// private boolean canRemove; -// -// public BagIterator(AbstractMapBag parent, Iterator support) { -// this.parent = parent; -// this.support = support; -// this.current = null; -// this.mods = parent.modCount; -// this.canRemove = false; -// } -// -// public boolean hasNext() { -// return support.hasNext(); -// } -// -// public Object next() { -// if (parent.modCount != mods) { -// throw new ConcurrentModificationException(); -// } -// current = support.next(); -// canRemove = true; -// return current; -// } -// -// public void remove() { -// if (parent.modCount != mods) { -// throw new ConcurrentModificationException(); -// } -// if (canRemove == false) { -// throw new IllegalStateException(); -// } -// support.remove(); -// parent.remove(current, 1); -// canRemove = false; -// mods++; -// } -// } - static class BagIterator implements Iterator { private AbstractMapBag parent; private Iterator entryIterator;