|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An iterator for IDiscussionItemList that allows the programmer
to traverse the list in either direction, modify the list during iteration,
and obtain the iterator's current position in the list.
A list iterator has
no current element; its cursor position always lies between the element
that would be returned by a call to previous() and the element that would
be returned by a call to next(). In a list of length n, there are n+1 valid
index values, from 0 to n, inclusive.
| Method Summary | |
void |
add(IDiscussionItem discussionItem)
Inserts the specified discussion item into the list. |
boolean |
hasNext()
Returns true if this list iterator has more discussion items when traversing the
list in the forward direction. |
boolean |
hasPrevious()
Returns true if this list iterator has more discussion items when traversing
the list in the reverse direction. |
IDiscussionItem |
next()
Returns the next discussion item in the list. |
int |
nextIndex()
Returns the index of the discussion item that would be returned by a subsequent call to next. |
IDiscussionItem |
previous()
Returns the previous discussion item in the list. |
int |
previousIndex()
Returns the index of the discussion item that would be returned by a subsequent call to previous. |
void |
remove()
Removes from the list the last discussion item that was returned by next or previous. |
void |
set(IDiscussionItem discussionItem)
Replaces the last discussion item returned by next or previous with the specified discussion item. |
| Method Detail |
public boolean hasNext()
true if this list iterator has more discussion items when traversing the
list in the forward direction. (In other words, returns true if next would
return a discussion item rather than throwing an exception.)true, if the list iterator has more discussion items when traversing the list in the forward directionpublic IDiscussionItem next()
IDiscussionItem, it is the next discussion item in the listNoSuchElementException - if the iteration has no next elementpublic boolean hasPrevious()
true if this list iterator has more discussion items when traversing
the list in the reverse direction. (In other words, returns true if
previous would return a discussion item rather than throwing an exception.)true, if the list iterator has more discussion items when traversing the list in the reverse directionNoSuchElementException - if the iteration has no previous elementpublic IDiscussionItem previous()
IDiscussionItem, it is the previous discussion item in the listNoSuchElementException - if the iteration has no previous elementpublic int nextIndex()
public int previousIndex()
public void remove()
java.lang.UnsupportedOperationException - if the remove operation is not supported by this list iteratorjava.lang.IllegalStateException - if neither next nor previous have been called, or remove or add have been called after the last call to next or previouspublic void set(IDiscussionItem discussionItem)
discussionItem - the discussion item with which to replace the last discussion item returned by next or previousjava.lang.UnsupportedOperationException - if the set operation is not supported by this list iteratorClassCastException - if the class of the specified discussion item prevents it from being added to this listjava.lang.IllegalArgumentException - if some aspect of the specified discussion item prevents it from being added to this listjava.lang.IllegalStateException - if neither next nor previous have been called, or remove or add have been called after the last call to next or previouspublic void add(IDiscussionItem discussionItem)
discussionItem - the discussion item to insertjava.lang.UnsupportedOperationException - if the add method is not supported by this list iteratorClassCastException - if the class of the specified discussion item prevents it from being added to this listjava.lang.IllegalArgumentException - if some aspect of this discussion item prevents it from being added to this list
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||