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 ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815059 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0dc3d1c283
commit
47518afaad
|
@ -29,10 +29,10 @@ import java.util.ListIterator;
|
||||||
* @author Rodney Waldhoff
|
* @author Rodney Waldhoff
|
||||||
* @author Stephen Colebourne
|
* @author Stephen Colebourne
|
||||||
*/
|
*/
|
||||||
public class AbstractListIteratorDecorator implements ListIterator {
|
public class AbstractListIteratorDecorator<E> implements ListIterator<E> {
|
||||||
|
|
||||||
/** The iterator being decorated */
|
/** The iterator being decorated */
|
||||||
protected final ListIterator iterator;
|
protected final ListIterator<E> iterator;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ public class AbstractListIteratorDecorator implements ListIterator {
|
||||||
* @param iterator the iterator to decorate, must not be null
|
* @param iterator the iterator to decorate, must not be null
|
||||||
* @throws IllegalArgumentException if the collection is null
|
* @throws IllegalArgumentException if the collection is null
|
||||||
*/
|
*/
|
||||||
public AbstractListIteratorDecorator(ListIterator iterator) {
|
public AbstractListIteratorDecorator(ListIterator<E> iterator) {
|
||||||
super();
|
super();
|
||||||
if (iterator == null) {
|
if (iterator == null) {
|
||||||
throw new IllegalArgumentException("ListIterator must not be null");
|
throw new IllegalArgumentException("ListIterator must not be null");
|
||||||
|
@ -54,7 +54,7 @@ public class AbstractListIteratorDecorator implements ListIterator {
|
||||||
*
|
*
|
||||||
* @return the decorated iterator
|
* @return the decorated iterator
|
||||||
*/
|
*/
|
||||||
protected ListIterator getListIterator() {
|
protected ListIterator<E> getListIterator() {
|
||||||
return iterator;
|
return iterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class AbstractListIteratorDecorator implements ListIterator {
|
||||||
return iterator.hasNext();
|
return iterator.hasNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object next() {
|
public E next() {
|
||||||
return iterator.next();
|
return iterator.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class AbstractListIteratorDecorator implements ListIterator {
|
||||||
return iterator.hasPrevious();
|
return iterator.hasPrevious();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object previous() {
|
public E previous() {
|
||||||
return iterator.previous();
|
return iterator.previous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,11 +87,11 @@ public class AbstractListIteratorDecorator implements ListIterator {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set(Object obj) {
|
public void set(E obj) {
|
||||||
iterator.set(obj);
|
iterator.set(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(Object obj) {
|
public void add(E obj) {
|
||||||
iterator.add(obj);
|
iterator.add(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue