|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDataIndexCursor
This interface defines methods you can use to traverse an IData object's elements by absolute position. It is returned by an IData object's getIndexCursor method.
This cursor class has been deprecated. To position a cursor at a specific index, you may loop to that index using the next method in the IDataCursor class. The following is a simple example.
//---This method finds the Nth element and returns null if there is no element N. Object getElement(int n, IData data) { IDataCursor cur = data.getCursor(); int i = 0; while (cur.next()) { if (i == n) break; i++; } return cur.getValue(); }
Note: The contents of an IData object is not necessarily synchronized, so information, such as the value returned by count, might not be accurate if multiple cursors modify a single IData.
IData
,
IDataFactory
,
IDataCursor
,
IDataHashCursor
,
IDataTreeCursor
Method Summary | |
---|---|
int |
count()
Deprecated. Replaced by IDataUtil.size(IDataCursor) . |
boolean |
seek(int index)
Deprecated. No replacement. |
Methods inherited from interface com.wm.data.IDataCursor |
---|
delete, destroy, first, first, getCursorClone, getKey, getLastError, getValue, hasMoreData, hasMoreErrors, insertAfter, insertBefore, insertDataAfter, insertDataBefore, last, last, next, next, previous, previous, setErrorMode, setKey, setValue |
Method Detail |
---|
boolean seek(int index)
index
- an int specifying the index to which you want the cursor moved. The first entry in an IData object is index 0.
int count()
IDataUtil.size(IDataCursor)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |