From c08ffff306e7d68d46000359767d6469e36dea59 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Wed, 15 Jan 2003 21:52:39 +0000 Subject: [PATCH] Implement new Resetable Iterator interfaces git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130950 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/collections/iterators/LoopingIterator.java | 7 ++++--- .../commons/collections/iterators/ObjectArrayIterator.java | 6 +++--- .../collections/iterators/ObjectArrayListIterator.java | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/org/apache/commons/collections/iterators/LoopingIterator.java b/src/java/org/apache/commons/collections/iterators/LoopingIterator.java index 53e618e62..a600c33cd 100644 --- a/src/java/org/apache/commons/collections/iterators/LoopingIterator.java +++ b/src/java/org/apache/commons/collections/iterators/LoopingIterator.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/LoopingIterator.java,v 1.2 2003/01/10 20:21:25 rwaldhoff Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/LoopingIterator.java,v 1.3 2003/01/15 21:52:39 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -72,12 +72,13 @@ import java.util.NoSuchElementException; * implementations will throw a ConcurrentModificationException. * * @since Commons Collections 2.2 - * @version $Revision: 1.2 $ $Date: 2003/01/10 20:21:25 $ + * @version $Revision: 1.3 $ $Date: 2003/01/15 21:52:39 $ * * @author Jonathan Carlson * @author Stephen Colebourne */ -public class LoopingIterator implements Iterator { +public class LoopingIterator implements ResetableIterator { + /** The collection to base the iterator on */ private Collection collection; /** The current iterator */ diff --git a/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java b/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java index b0197533d..ee83ad444 100644 --- a/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java +++ b/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java,v 1.2 2003/01/10 20:21:25 rwaldhoff Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ObjectArrayIterator.java,v 1.3 2003/01/15 21:51:57 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -70,7 +70,7 @@ import java.util.NoSuchElementException; * back to the start if required. * * @since Commons Collections 2.2 - * @version $Revision: 1.2 $ $Date: 2003/01/10 20:21:25 $ + * @version $Revision: 1.3 $ $Date: 2003/01/15 21:51:57 $ * * @author James Strachan * @author Mauricio S. Moura @@ -78,7 +78,7 @@ import java.util.NoSuchElementException; * @author Neil O'Toole * @author Stephen Colebourne */ -public class ObjectArrayIterator implements Iterator { +public class ObjectArrayIterator implements ResetableIterator { /** The array */ protected Object[] array = null; diff --git a/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java b/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java index c92aa3841..b59b4df6e 100644 --- a/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java +++ b/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java @@ -1,5 +1,5 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java,v 1.2 2003/01/10 20:21:25 rwaldhoff Exp $ + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java,v 1.3 2003/01/15 21:51:57 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 @@ -74,12 +74,12 @@ import java.util.NoSuchElementException; * @see java.util.ListIterator * * @since Commons Collections 2.2 - * @version $Revision: 1.2 $ $Date: 2003/01/10 20:21:25 $ + * @version $Revision: 1.3 $ $Date: 2003/01/15 21:51:57 $ * * @author Neil O'Toole * @author Stephen Colebourne */ -public class ObjectArrayListIterator extends ObjectArrayIterator implements ListIterator { +public class ObjectArrayListIterator extends ObjectArrayIterator implements ResetableListIterator { /** * Holds the index of the last item returned by a call to next()