You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2009/09/15 07:55:30 UTC

svn commit: r815059 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java

Author: bayard
Date: Tue Sep 15 05:55:30 2009
New Revision: 815059

URL: http://svn.apache.org/viewvc?rev=815059&view=rev
Log:
Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956.

Also see the following revisions:

    ------------------------------------------------------------------------
    r555925 | skestle | 2007-07-13 03:39:24 -0700 (Fri, 13 Jul 2007) | 2 lines
    
    Added Edwin Tellman's patch for COLLECTIONS-243.  
    It all seems pretty reasonable, and it should all be checked again as the project is worked through
    ------------------------------------------------------------------------

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java?rev=815059&r1=815058&r2=815059&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/iterators/AbstractListIteratorDecorator.java Tue Sep 15 05:55:30 2009
@@ -29,10 +29,10 @@
  * @author Rodney Waldhoff
  * @author Stephen Colebourne
  */
-public class AbstractListIteratorDecorator implements ListIterator {
+public class AbstractListIteratorDecorator<E> implements ListIterator<E> {
 
     /** The iterator being decorated */
-    protected final ListIterator iterator;
+    protected final ListIterator<E> iterator;
 
     //-----------------------------------------------------------------------
     /**
@@ -41,7 +41,7 @@
      * @param iterator  the iterator to decorate, must not be null
      * @throws IllegalArgumentException if the collection is null
      */
-    public AbstractListIteratorDecorator(ListIterator iterator) {
+    public AbstractListIteratorDecorator(ListIterator<E> iterator) {
         super();
         if (iterator == null) {
             throw new IllegalArgumentException("ListIterator must not be null");
@@ -54,7 +54,7 @@
      * 
      * @return the decorated iterator
      */
-    protected ListIterator getListIterator() {
+    protected ListIterator<E> getListIterator() {
         return iterator;
     }
 
@@ -63,7 +63,7 @@
         return iterator.hasNext();
     }
 
-    public Object next() {
+    public E next() {
         return iterator.next();
     }
 
@@ -75,7 +75,7 @@
         return iterator.hasPrevious();
     }
 
-    public Object previous() {
+    public E previous() {
         return iterator.previous();
     }
 
@@ -87,11 +87,11 @@
         iterator.remove();
     }
 
-    public void set(Object obj) {
+    public void set(E obj) {
         iterator.set(obj);
     }
 
-    public void add(Object obj) {
+    public void add(E obj) {
         iterator.add(obj);
     }