org.eclipse.emf.common.util
Class DelegatingEList.EListIterator
java.lang.Object
|
+--org.eclipse.emf.common.util.DelegatingEList.EIterator
|
+--org.eclipse.emf.common.util.DelegatingEList.EListIterator
- All Implemented Interfaces:
- java.util.Iterator, java.util.ListIterator
- Direct Known Subclasses:
- DelegatingEList.NonResolvingEListIterator
- Enclosing class:
- DelegatingEList
- protected class DelegatingEList.EListIterator
- extends DelegatingEList.EIterator
- implements java.util.ListIterator
An extensible list iterator implementation.
|
Method Summary |
void |
add(java.lang.Object object)
Adds the object at the next index and advances the iterator past it. |
boolean |
hasPrevious()
Returns whether there are more objects for previous(). |
int |
nextIndex()
Returns the index of the object that would be returned by calling next. |
java.lang.Object |
previous()
Returns the previous object and advances the iterator. |
int |
previousIndex()
Returns the index of the object that would be returned by calling previous. |
void |
set(java.lang.Object object)
Sets the object at the index of the last call to next or previous. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.ListIterator |
hasNext, next, remove |
DelegatingEList.EListIterator
public DelegatingEList.EListIterator()
- Creates an instance.
DelegatingEList.EListIterator
public DelegatingEList.EListIterator(int index)
- Creates an instance advanced to the index.
- Parameters:
index - the starting index.
hasPrevious
public boolean hasPrevious()
- Returns whether there are more objects for
previous().
Returns whether there are more objects.
- Specified by:
hasPrevious in interface java.util.ListIterator
previous
public java.lang.Object previous()
- Returns the previous object and advances the iterator.
This implementation delegates to
get.
- Specified by:
previous in interface java.util.ListIterator
- Returns:
- the previous object.
- Throws:
java.util.NoSuchElementException - if the iterator is done.
nextIndex
public int nextIndex()
- Returns the index of the object that would be returned by calling
next.
- Specified by:
nextIndex in interface java.util.ListIterator
- Returns:
- the index of the object that would be returned by calling
next.
previousIndex
public int previousIndex()
- Returns the index of the object that would be returned by calling
previous.
- Specified by:
previousIndex in interface java.util.ListIterator
- Returns:
- the index of the object that would be returned by calling
previous.
set
public void set(java.lang.Object object)
- Sets the object at the index of the last call to
next or previous.
This implementation delegates to set.
- Specified by:
set in interface java.util.ListIterator
- Parameters:
object - the object to set.- Throws:
IllegalStateException - if next or previous have not yet been called,
or remove or add have already been called
after the last call to next or previous.
add
public void add(java.lang.Object object)
- Adds the object at the
next index and advances the iterator past it.
This implementation delegates to add(int, Object).
- Specified by:
add in interface java.util.ListIterator
- Parameters:
object - the object to add.