Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
IList.moveToRow
Changes the "current row" to the specified row position.
Syntax
public boolean moveToRow(int how, int v)Parameters
how
- The method of moving to a row:
IList.first
- Move to the first row in the list.IList.last
- Move to the last row in the list.IList.next
- Move to the next row in the list.IList.prev -
Move to the previous row in the list.IList.gotorow
- Move to the row specified byv
.v
- If you set
how
toIList.gotorow
, then setv
to the specific row number. The first row is1
(not0
). If you sethow
to something other thanIList.gotorow
, thenmoveToRow
ignores the value ofv
.Returns
Returns
true
on success,false
on failure.Example
The following code walks through each row in a list:
String rating; String title; String year; do { rating = MatchingMovies.getValue("rating"); title = MatchingMovies.getValue("title"); year = MatchingMovies.getValue("year"); } while (MatchingMovies.moveToRow(IList.next, 0) );See Also
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.