MCPcopy Create free account
hub / github.com/PCGen/pcgen / lookup

Method lookup

code/src/java/pcgen/cdom/format/table/DataTable.java:268–276  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers 4

testBasicMethod · 0.95
testIndependenceMethod · 0.95
evaluateMethod · 0.95

Calls 2

getColumnIndexMethod · 0.95
getRowMethod · 0.95

Tested by 3

testBasicMethod · 0.76
testIndependenceMethod · 0.76