com.ds.fw.types.collections
Interface FwCursorIteratorIF

All Superinterfaces:
java.util.Iterator
All Known Implementing Classes:
FwListCursorIterator

public interface FwCursorIteratorIF
extends java.util.Iterator

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


Method Summary
 com.ds.fw.types.collections.FwCursorIteratorMarkIF getMark()
          Gets a marker for the current list.
 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 a next element of the list (if the boundary is not reached yet).
 boolean hasPrevious()
          Checks if there is a previous element of the list (if the boundary is not reached yet).
 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 m)
          Sets the list settings to these of the given marker.
 
Methods inherited from interface java.util.Iterator
remove
 

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 java.util.Iterator

previous

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


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.


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.


hasNext

public boolean hasNext()
Checks if there is a next element of the list (if the boundary is not reached yet).

Specified by:
hasNext in interface java.util.Iterator
Returns:
true or false

hasPrevious

public boolean hasPrevious()
Checks if there is a previous element of the list (if the boundary is not reached yet).

Returns:
true or false

getMark

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

Returns:
a marker object interface

setMark

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

Parameters:
m - a marker object interface

gotoStart

public void gotoStart()
Positions the list cursor at the first element of the list.


gotoEnd

public void gotoEnd()
Positions the list cursor at the last element of the list.