added a variation of get(row, column) to table that allows column to be specified by name, improving readability.
@@ -416,6 +416,21 @@ public class Table extends Relation implements IntIterable {
return column.getString(r);
}
+ /**
+ * Returns a string representation of the value at the given row and column indexes
+ *
+ * @param r the row index, 0 based
+ * @param columnName the name of the column to be returned
+ *
+ * // TODO: performance would be greatly enhanced if columns could be referenced via a hashTable
+ */
+ public String get(int r, String columnName) {
+ Column column = column(columnIndex(columnName));
+ return column.getString(r);
+ }
+
+
+
/**
* Returns a table with the same columns as this table
*/
