Get a String value from the table. If the row is longer than the table @webref table:method @brief Get an String value from the specified row and column @param row ID number of the row to reference @param column ID number of the column to reference @see Table#getInt(int, int) @see Table#getFloat(in
(int row, int column)
| 3474 | * @see Table#setString(int, int, String) |
| 3475 | */ |
| 3476 | public String getString(int row, int column) { |
| 3477 | checkBounds(row, column); |
| 3478 | if (columnTypes[column] == STRING) { |
| 3479 | String[] stringData = (String[]) columns[column]; |
| 3480 | return stringData[row]; |
| 3481 | } else if (columnTypes[column] == CATEGORY) { |
| 3482 | int cat = getInt(row, column); |
| 3483 | if (cat == missingCategory) { |
| 3484 | return missingString; |
| 3485 | } |
| 3486 | return columnCategories[column].key(cat); |
| 3487 | } else if (columnTypes[column] == FLOAT) { |
| 3488 | if (Float.isNaN(getFloat(row, column))) { |
| 3489 | return null; |
| 3490 | } |
| 3491 | } else if (columnTypes[column] == DOUBLE) { |
| 3492 | if (Double.isNaN(getFloat(row, column))) { |
| 3493 | return null; |
| 3494 | } |
| 3495 | } |
| 3496 | return String.valueOf(Array.get(columns[column], row)); |
| 3497 | } |
| 3498 | |
| 3499 | |
| 3500 | /** |
no test coverage detected