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

Method getRange

code/src/java/pcgen/core/doomsdaybook/RuleSet.java:185–201  ·  view source on GitHub ↗

Get the range. @return range @throws Exception When no entry exists for the supplied key.

()

Source from the content-addressed store, hash-verified

183 * @throws Exception When no entry exists for the supplied key.
184 */
185 private int getRange() throws Exception
186 {
187 int rangeTop = 0;
188
189 for (String key : this)
190 {
191 DataElement value = allVars.getDataElement(key);
192 rangeTop += value.getWeight();
193 }
194
195 if (rangeTop <= 0)
196 { //the die will nullpointer if it is not at least 1
197 rangeTop = 1;
198 }
199
200 return rangeTop;
201 }
202
203 /**
204 * Get the rule.

Callers 2

getDataMethod · 0.95
getRuleMethod · 0.95

Calls 2

getWeightMethod · 0.95
getDataElementMethod · 0.45

Tested by

no test coverage detected