coins.aflow.util
インタフェース CoinsIterator

すべてのスーパーインタフェース:
java.util.Iterator, java.util.ListIterator
既知のサブインタフェースの一覧:
SetRefReprIterator
既知の実装クラスの一覧:
CoinsList.Itr, SetRefReprListHir.SetRefReprListHirItr

public interface CoinsIterator
extends java.util.ListIterator

CoinsIterator.java Created on August 11, 2002, 5:48 PM

Iterator that can accomodate the structural modification in any way in the underlying list, without throwing ConcurrentModificationException.

When an object is added to the underlying list, what is returned by the subsequent call to next(next element of this iterator) will be the same as when there were no such addition. What is returned by the call to previous will be the same as before, except for the case where the new object was added just before the next element, in which case the newly added object will be returned. The result of the call to nextIndex and previousIndex will be incremented by one if the element was added somewhere before the next element.

When an object is removed from the underlying list, what is returned by the subsequent call to next and previous will be altered if what was removed was what would be returned if there was no such removal. In that case, next and previous return the next element and the previous element of what was removed (before its removal), respectively (if any). nextIndex and previousIndex will be decremented by one if the next element of this iterator before the call to remove lied somewhere after what was removed.

関連項目:
ListIterator

メソッドの概要
 void add(java.lang.Object o)
          Returns what was returned by the previous call to next or previous This is what will be removed by remove.
 void addAfter(java.lang.Object o)
          Adds an element to the underlying list after the imaginary cursor of this iterator.
 java.lang.Object next()
          Returns the next element, and advances the imaginary cursor by one.
 int nextIndex()
          Returns the index of the next element
 java.lang.Object previous()
          Returns the previous element, and steps back the imaginary cursor by one.
 int previousIndex()
          Returns the index of the previous element
 void remove()
          Remove what was returned by the previous call to next or previous
 
インタフェース java.util.ListIterator から継承したメソッド
hasNext, hasPrevious, set
 

メソッドの詳細

next

public java.lang.Object next()
Returns the next element, and advances the imaginary cursor by one.

定義:
インタフェース java.util.ListIterator 内の next

previous

public java.lang.Object previous()
Returns the previous element, and steps back the imaginary cursor by one.

定義:
インタフェース java.util.ListIterator 内の previous

nextIndex

public int nextIndex()
Returns the index of the next element

定義:
インタフェース java.util.ListIterator 内の nextIndex

previousIndex

public int previousIndex()
Returns the index of the previous element

定義:
インタフェース java.util.ListIterator 内の previousIndex

remove

public void remove()
Remove what was returned by the previous call to next or previous

定義:
インタフェース java.util.ListIterator 内の remove
例外:
java.lang.IllegalStateException - if either there was no call to either next or previous, what was returned by such a call is already removed from the underlying list, or this iterator's method that structurally modifies the underlying list was called after such a call to next or previous.

add

public void add(java.lang.Object o)
Returns what was returned by the previous call to next or previous This is what will be removed by remove. In the situation where remove will throw IllegalArgumentException, this method will return null. Object lastReturned(); /** Adds an element to the underlying list before the imaginary cursor of this iterator. That is, the subsequent call to next will be unaffected while the call to previous will return the object added by this method.

定義:
インタフェース java.util.ListIterator 内の add

addAfter

public void addAfter(java.lang.Object o)
Adds an element to the underlying list after the imaginary cursor of this iterator. That is, the subsequent call to previous will be unaffected while the call to next will return the object added by this method.