Returns the value in this DataTable for the row with the lookup value valid (via the given LookupType) to the given key and from the column with the given name. Note that the returned value is value-semantic. Therefore any changes made to that object will change the object stored in this DataTable.
(LookupType lookupType, Object lookupValue, String resultingColumn)
| 266 | * for the given LookupType, from the column with the given name |
| 267 | */ |
| 268 | public Object lookup(LookupType lookupType, Object lookupValue, String resultingColumn) |
| 269 | { |
| 270 | int resultingColumnNumber = getColumnIndex(resultingColumn); |
| 271 | if (resultingColumnNumber == -1) |
| 272 | { |
| 273 | throw new IllegalArgumentException("Cannot find column named: " + resultingColumn); |
| 274 | } |
| 275 | return lookup(lookupType, lookupValue, resultingColumnNumber); |
| 276 | } |
| 277 | |
| 278 | private int getColumnIndex(String string) |
| 279 | { |