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

Method getTokenNumberInMaps

code/src/java/pcgen/core/BioSet.java:250–265  ·  view source on GitHub ↗
(final String addKey, final int tokenNum, Optional<Region> region, String raceName)

Source from the content-addressed store, hash-verified

248 }
249
250 private String getTokenNumberInMaps(final String addKey, final int tokenNum, Optional<Region> region, String raceName)
251 {
252 final List<String> r = getValueInMaps(region, raceName, addKey);
253
254 if (r == null)
255 {
256 return null;
257 }
258
259 if (r.size() <= tokenNum)
260 {
261 return "0";
262 }
263
264 return r.get(tokenNum);
265 }
266
267 /**
268 * Returns the List of items in the BioSet for the given Region, Race and token key.

Callers 3

generateAgeMethod · 0.95
generateBioValueMethod · 0.95
generateHeightWeightMethod · 0.95

Calls 3

getValueInMapsMethod · 0.95
sizeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected