scolebourne 2003/01/15 13:53:14
Modified: collections/src/java/org/apache/commons/collections/iterators
ArrayListIterator.java ArrayIterator.java
Log:
Implement new Resetable Iterator interfaces
Update licence
Update since and version tags
Revision Changes Path
1.2 +11 -12
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ArrayListIterator.java
Index: ArrayListIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ArrayListIterator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ArrayListIterator.java 13 Dec 2002 12:01:35 -0000 1.1
+++ ArrayListIterator.java 15 Jan 2003 21:53:14 -0000 1.2
@@ -1,13 +1,10 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +20,11 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
+ * any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
@@ -36,7 +33,7 @@
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -63,6 +60,7 @@
import java.lang.reflect.Array;
import java.util.ListIterator;
import java.util.NoSuchElementException;
+
/**
* Implements a {@link java.util.ListIterator ListIterator} over an array.
* <p>
@@ -79,12 +77,13 @@
* @see java.util.Iterator
* @see java.util.ListIterator
*
- * @since 2.2
+ * @since Commons Collections 2.2
+ * @version $Revision$ $Date$
+ *
* @author <a href="mailto:[EMAIL PROTECTED]">Neil O'Toole</a>
* @author Stephen Colebourne
- * @version $Revision$
*/
-public class ArrayListIterator extends ArrayIterator implements ListIterator {
+public class ArrayListIterator extends ArrayIterator implements
ResetableListIterator {
/**
* Holds the index of the last item returned by a call to <code>next()</code>
or <code>previous()</code>. This
1.3 +15 -14
jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ArrayIterator.java
Index: ArrayIterator.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ArrayIterator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ArrayIterator.java 13 Dec 2002 12:01:35 -0000 1.2
+++ ArrayIterator.java 15 Jan 2003 21:53:14 -0000 1.3
@@ -1,13 +1,10 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +20,11 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
+ * any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
@@ -36,7 +33,7 @@
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -63,6 +60,7 @@
import java.lang.reflect.Array;
import java.util.Iterator;
import java.util.NoSuchElementException;
+
/**
* Implements an {@link java.util.Iterator Iterator} over an array.
* <p>
@@ -71,18 +69,19 @@
* {@link org.apache.commons.collections.iterators.ObjectArrayIterator
ObjectArrayIterator}
* class is a better choice, as it will perform better.
* <p>
- * The iterator implements a {@link #reset} method, allowing the reset of the
iterator
- * back to the start if required.
+ * The iterator implements a {@link #reset} method, allowing the reset of
+ * the iterator back to the start if required.
+ *
+ * @since Commons Collections 1.0
+ * @version $Revision$ $Date$
*
- * @since 1.0
* @author <a href="mailto:[EMAIL PROTECTED]">James Strachan</a>
* @author Mauricio S. Moura
* @author <a href="mailto:[EMAIL PROTECTED]">Michael A. Smith</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Neil O'Toole</a>
* @author Stephen Colebourne
- * @version $Revision$
*/
-public class ArrayIterator implements Iterator {
+public class ArrayIterator implements ResetableIterator {
/** The array */
protected Object array;
@@ -100,6 +99,7 @@
* until {@link #setArray(Object)} is called to establish the array to iterate
over.
*/
public ArrayIterator() {
+ super();
}
/**
@@ -111,6 +111,7 @@
* @throws NullPointerException if <code>array</code> is <code>null</code>
*/
public ArrayIterator(Object array) {
+ super();
setArray( array );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>