com.ds.fw.types.collections
Class FwListCursorIterator

java.lang.Object
  |
  +--com.ds.fw.types.collections.FwListIterator
        |
        +--com.ds.fw.types.collections.FwListCursorIterator
All Implemented Interfaces:
FwCursorIteratorIF, FwListIteratorIF, java.util.Iterator, java.util.ListIterator

public class FwListCursorIterator
extends FwListIterator
implements FwCursorIteratorIF

This class implements the FwCursorIteratorIF interface. Unlike the java iterator interface the next and previous methods do *NOT* throw an exception. If there is no element to return for next() or previous() then the methods return null.


Field Summary
 
Fields inherited from class com.ds.fw.types.collections.FwListIterator
_index, _lastReturned, _list
 
Constructor Summary
FwListCursorIterator()
          Constructor.
 
Method Summary
 com.ds.fw.types.collections.FwCursorIteratorMarkIF getMark()
          Gets a marker for the current list.
 java.lang.Object next()
          Returns the next element of the list or null, if the array bound is reached.
 com.ds.fw.types.collections.FwListIF next(int n)
          Returns a sublist with next n elements of the list.
 java.lang.Object previous()
          Returns the previous element of the list or null, if the array bound is reached.
 com.ds.fw.types.collections.FwListIF previous(int n)
          Returns a sublist with previous n elements of the list.
 void setMark(com.ds.fw.types.collections.FwCursorIteratorMarkIF e)
          Sets the list settings to these of the given marker.
 
Methods inherited from class com.ds.fw.types.collections.FwListIterator
add, getList, gotoEnd, gotoStart, hasNext, hasPrevious, nextIndex, previousIndex, remove, set, setList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ds.fw.types.collections.FwCursorIteratorIF
gotoEnd, gotoStart, hasNext, hasPrevious
 
Methods inherited from interface java.util.Iterator
remove
 

Constructor Detail

FwListCursorIterator

public FwListCursorIterator()
Constructor.

Method Detail

next

public java.lang.Object next()
Returns the next element of the list or null, if the array bound is reached.

Specified by:
next in interface FwCursorIteratorIF
Overrides:
next in class FwListIterator
Returns:
the element

previous

public java.lang.Object previous()
Returns the previous element of the list or null, if the array bound is reached.

Specified by:
previous in interface FwCursorIteratorIF
Overrides:
previous in class FwListIterator
Returns:
the element

next

public com.ds.fw.types.collections.FwListIF next(int n)
Returns a sublist with next n elements of the list. If n exceeds the array boundary the sublist will be ternminated at the boundary.

Specified by:
next in interface FwCursorIteratorIF
Overrides:
next in class FwListIterator

previous

public com.ds.fw.types.collections.FwListIF previous(int n)
Returns a sublist with previous n elements of the list. If n exceeds the array boundary the sublist will be ternminated at the boundary.

Specified by:
previous in interface FwCursorIteratorIF
Overrides:
previous in class FwListIterator

getMark

public com.ds.fw.types.collections.FwCursorIteratorMarkIF getMark()
Gets a marker for the current list.

Specified by:
getMark in interface FwCursorIteratorIF
Returns:
a marker object interface

setMark

public void setMark(com.ds.fw.types.collections.FwCursorIteratorMarkIF e)
Sets the list settings to these of the given marker.

Specified by:
setMark in interface FwCursorIteratorIF
Parameters:
e - a marker object interface