Home > Contents > Index >
IList.hasData
Checks whether this list contains any data.
Syntax
public boolean hasData()Description
The
hasData
method 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
true
if the list contains data,false
if 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, 2018, Oracle and/or its affiliates. All rights reserved.