|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
YCursor is a general interface for iterating over a collection of objects. It can be regarded as a read-only view of a collection of elements. A YCursor acts like a movable pointer on the elements of a collection. The pointer can be moved forward and backward and the element currently pointed on can be accessed. The removal of elements can only be performed on the provider of the cursor, not on the read-only cursor itself. Implementations of this interface do not need to support the optional operations of this interface.
Method Summary | |
Object |
current()
Returns the Object currently pointed on. |
void |
next()
Moves this cursor one position forward. |
boolean |
ok()
Returns true if the current cursor position is valid. |
void |
prev()
Moves this cursor one position backward (optional) |
int |
size()
Returns the number of elements that can be accessed with this cursor. |
void |
toFirst()
Moves this cursor to the first valid cursor position (optional). |
void |
toLast()
Moves this cursor to the last valid cursor position (optional). |
Method Detail |
public boolean ok()
true
if the current cursor position is valid.
public void next()
public void prev()
public void toFirst()
public void toLast()
public Object current()
public int size()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |