Get the range. @return range @throws Exception When no entry exists for the supplied key.
()
| 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. |
no test coverage detected