|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface YCursor
A general interface for iterating over a collection of objects. It can be regarded as a read-only view of such a collection.
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 cursor itself. (That's why the cursor presents a read-only view.) Implementations of this interface do not need to support operations marked "optional."
Method Summary | |
---|---|
java.lang.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 |
---|
boolean ok()
true
if the current cursor position is valid.
void next()
void prev()
void toFirst()
void toLast()
java.lang.Object current()
int size()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |