|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ds.fw.types.collections.FwListIterator
This class implements the FwListIteratorIF, which wraps the ListIterator interface. The list for the iterator to use could be set explicitly (in the Java API usually the ListInterator is an interface that is get from the existing list).
| Field Summary | |
int |
_index
Current list index |
int |
_lastReturned
Index of the last returned list element |
java.util.List |
_list
Handle of the list to be iterated |
| Constructor Summary | |
FwListIterator()
Constructor. |
|
| Method Summary | |
void |
add(java.lang.Object o)
Adds an object to the list. |
java.util.List |
getList()
Gets the current list this iterator works with. |
void |
gotoEnd()
Positions the list cursor at the last element of the list. |
void |
gotoStart()
Positions the list cursor at the first element of the list. |
boolean |
hasNext()
Checks if there is next element in the list (if the array boundary is reached) |
boolean |
hasPrevious()
Checks if there is previous element in the list (if the array boundary is reached) |
java.lang.Object |
next()
Returns the the next element of the list. |
com.ds.fw.types.collections.FwListIF |
next(int n)
Returns a sublist with next n elements of the list. |
int |
nextIndex()
Returns the index of the next element. |
java.lang.Object |
previous()
Returns the the previous element of the list. |
com.ds.fw.types.collections.FwListIF |
previous(int n)
Returns a sublist with previous n elements of the list. |
int |
previousIndex()
Returns the index of the previuos element. |
void |
remove()
Removes the current element of the list. |
void |
set(java.lang.Object o)
Sets current element of the list to the given object. |
void |
setList(java.util.List o)
Sets the current list this iterator works with. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.List _list
public int _index
public int _lastReturned
| Constructor Detail |
public FwListIterator()
| Method Detail |
public java.util.List getList()
getList in interface FwListIteratorIFpublic void setList(java.util.List o)
setList in interface FwListIteratorIFo - the listpublic boolean hasNext()
hasNext in interface java.util.ListIteratorpublic boolean hasPrevious()
hasPrevious in interface java.util.ListIteratorpublic int nextIndex()
nextIndex in interface java.util.ListIteratorpublic int previousIndex()
previousIndex in interface java.util.ListIteratorpublic java.lang.Object next()
next in interface java.util.ListIteratorpublic java.lang.Object previous()
previous in interface java.util.ListIteratorpublic com.ds.fw.types.collections.FwListIF next(int n)
public com.ds.fw.types.collections.FwListIF previous(int n)
public void set(java.lang.Object o)
set in interface java.util.ListIteratoro - the object to be set to the listpublic void remove()
remove in interface java.util.ListIteratorpublic void add(java.lang.Object o)
add in interface java.util.ListIteratoro - the object to be addedpublic void gotoStart()
public void gotoEnd()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||