Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
IList.hasData
Checks whether this list contains any data.
Syntax
public boolean hasData()Description
The
hasDatamethod checks whether a list has any data. To avoid any potential internal state inconsistencies, you should always check the list to determine if it contains any data prior to manipulating it.Returns
Returns
trueif the list contains data,falseif it is empty.Example
String apath = node; IList ilist = ics.GetList("TreeManagerTest"); if(ilist.hasData()) { int r = ilist.numRows(); String values; for(int i = 1; i <= r; i++) { try{ ilist.moveTo(i); values = ilist.getValue("nid"); apath = apath+":"+values; } catch(NoSuchFieldException e){System.out.println(e);}; } } return apath;
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.