@@ -214,12 +214,14 @@ public BeanIterator<?> iterator(Class<?> beanType, boolean relations){
214214 /**
215215 * This is the simplest case to read data from a Table referencing a file or URL.
216216 *
217- * Each row of the table will be returned as an Object array. Values in each column
218- * are parsed and converted ("cast) to Java objects on a best guess approach.
219- * @return Interator returning table rows as Object Arrays
217+ * If a Schema is set on a table, each row will be returned as an Object array. Values in each column
218+ * are parsed and converted ("cast") to Java objects based on the Field definitions of the Schema. If no Schema is
219+ * present, rows will always return string arrays
220+ *
221+ * @return Iterator returning table rows as Object/String Arrays
220222 */
221223 public Iterator <Object []> iterator () {
222- return new TableIterator <>(this , false , false , true , false );
224+ return new TableIterator <>(this , false , false , true , false );
223225 }
224226
225227 /**
@@ -237,8 +239,14 @@ public Iterator<Object[]> iterator() {
237239 * < li> Resolving references to other data sources (parameter `relations` = true)</li>
238240 * </ul>
239241 *
240- * Without a Schema, values in each column are parsed and converted ("cast) to Java objects on a
241- * best guess approach. If a Schema is set on a table, the Field definitions will be used for parsing
242+ * The following rules apply:
243+ * <ul>
244+ * <li>if no Schema is present, rows will always return string arrays, not objects, as if `cast` was always off</li>
245+ * <li>if `extended` is true, then `cast` is also true, but `keyed` is false</li>
246+ * <li>if `keyed` is true, then `cast` is also true, but `extended` is false</li>
247+ * </ul>
248+ *
249+ * If a Schema is set on a table, the Field definitions will be used for parsing
242250 * data values to objects.
243251 *
244252 * @return Interator returning table rows as Objects, either Arrays or Maps
@@ -249,7 +257,7 @@ public Iterator<Object> iterator(boolean keyed, boolean extended, boolean cast,
249257
250258 /**
251259 * This method creates an Iterator that will return table rows as String arrays.
252- * It therefore disregards the Schema set on the table.
260+ * It therefore disregards the Schema set on the table. It does not follow relations.
253261 *
254262 * @return Iterator that returns rows as string arrays.
255263 */
@@ -259,7 +267,7 @@ public Iterator<String[]> stringArrayIterator() {
259267
260268 /**
261269 * This method creates an Iterator that will return table rows as String arrays.
262- * It therefore disregards the Schema set on the table.
270+ * It therefore disregards the Schema set on the table. It can be configured to follow relations.
263271 *
264272 * @param relations Whether references to other data sources get resolved
265273 * @return Iterator that returns rows as string arrays.
@@ -270,7 +278,7 @@ public Iterator<String[]> stringArrayIterator(boolean relations) {
270278
271279 /**
272280 * This method creates an Iterator that will return table rows as a Map<String,Object>
273- * where key is the header name, and val is the data converted to Java objects
281+ * where key is the header name, and val is the data converted to Java objects. It does not follow relations.
274282 *
275283 * @return Iterator that returns rows as Maps.
276284 */
@@ -280,12 +288,13 @@ public Iterator<Map<String, Object>> mappingIterator() {
280288
281289 /**
282290 * This method creates an Iterator that will return table rows as a Map<String,Object>
283- * where key is the header name, and val is the data converted to Java objects
291+ * where key is the header name, and val is the data converted to Java objects.
292+ * It can be configured to follow relations
284293 *
285294 * @param relations Whether references to other data sources get resolved
286295 * @return Iterator that returns rows as Maps.
287296 */
288- public Iterator <Map <String , Object >> keyedIterator (boolean extended , boolean cast , boolean relations ){
297+ public Iterator <Map <String , Object >> mappingIterator (boolean extended , boolean cast , boolean relations ){
289298 return new TableIterator <>(this , true , extended , cast , relations );
290299 }
291300
0 commit comments