MCPcopy Index your code
hub / github.com/davidgiven/luje / decode

Method decode

lib/java/lang/Short.java:125–132  ·  view source on GitHub ↗

Parses the specified string and returns a Short instance if the string can be decoded into a short value. The string may be an optional minus sign "-" followed by a hexadecimal ("0x..." or "#..."), octal ("0..."), or decimal ("...") representation of a short. @param string a stri

(String string)

Source from the content-addressed store, hash-verified

123 * if {@code string} can not be parsed as a short value.
124 */
125 public static Short decode(String string) throws NumberFormatException {
126 int intValue = Integer.decode(string).intValue();
127 short result = (short) intValue;
128 if (result == intValue) {
129 return valueOf(result);
130 }
131 throw new NumberFormatException();
132 }
133
134 @Override
135 public double doubleValue() {

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
valueOfMethod · 0.95
intValueMethod · 0.45

Tested by

no test coverage detected