MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getValue

Method getValue

src/main/java/core/org/xbill/DNS/Mnemonic.java:189–208  ·  view source on GitHub ↗

Gets the numeric value corresponding to a text mnemonic. @param str The text mnemonic @return The corresponding numeric value, or -1 if there is none

(String str)

Source from the content-addressed store, hash-verified

187 * @return The corresponding numeric value, or -1 if there is none
188 */
189public int
190getValue(String str) {
191 str = sanitize(str);
192 Integer value = (Integer) strings.get(str);
193 if (value != null) {
194 return value.intValue();
195 }
196 if (prefix != null) {
197 if (str.startsWith(prefix)) {
198 int val = parseNumeric(str.substring(prefix.length()));
199 if (val >= 0) {
200 return val;
201 }
202 }
203 }
204 if (numericok) {
205 return parseNumeric(str);
206 }
207 return -1;
208}
209
210}

Callers 15

valueMethod · 0.45
valueMethod · 0.45
nextMethod · 0.45
toMasterFileMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45
valueMethod · 0.45

Calls 5

sanitizeMethod · 0.95
parseNumericMethod · 0.95
intValueMethod · 0.80
lengthMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected