/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerToStringTest.java | 37 int radix = 10; in testRadixOutOfRange() local 38 BigInteger aNumber = new BigInteger(value, radix); in testRadixOutOfRange() 48 int radix = 2; in testRadix2Neg() local 49 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Neg() 50 String result = aNumber.toString(radix); in testRadix2Neg() 59 int radix = 2; in testRadix2Pos() local 60 BigInteger aNumber = new BigInteger(value, radix); in testRadix2Pos() 61 String result = aNumber.toString(radix); in testRadix2Pos() 70 int radix = 16; in testRadix10Neg() local 71 BigInteger aNumber = new BigInteger(value, radix); in testRadix10Neg() [all …]
|
D | BigIntegerConstructorsTest.java | 576 int radix = 45; in testConstructorStringException1() local 578 new BigInteger(value, radix); in testConstructorStringException1() 590 int radix = 10; in testConstructorStringException2() local 592 new BigInteger(value, radix); in testConstructorStringException2() 604 int radix = 34; in testConstructorStringException3() local 606 new BigInteger(value, radix); in testConstructorStringException3() 618 int radix = 20; in testConstructorStringException4() local 620 new BigInteger(value, radix); in testConstructorStringException4() 631 int radix = 2; in testConstructorStringRadix2() local 633 BigInteger aNumber = new BigInteger(value, radix); in testConstructorStringRadix2() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Integer.java | 156 public static String toString(int i, int radix) { in toString() argument 157 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString() 158 radix = 10; in toString() 161 if (radix == 10) { in toString() 177 while (i <= -radix) { in toString() 178 buf[charPos--] = (byte)digits[-(i % radix)]; in toString() 179 i = i / radix; in toString() 245 public static String toUnsignedString(int i, int radix) { in toUnsignedString() argument 246 return Long.toUnsignedString(toUnsignedLong(i), radix); in toUnsignedString() 409 int radix = 1 << shift; in formatUnsignedInt() local [all …]
|
D | Long.java | 142 public static String toString(long i, int radix) { in toString() argument 143 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString() 144 radix = 10; in toString() 145 if (radix == 10) in toString() 160 while (i <= -radix) { in toString() 161 buf[charPos--] = (byte)Integer.digits[(int)(-(i % radix))]; in toString() 162 i = i / radix; in toString() 226 public static String toUnsignedString(long i, int radix) { in toUnsignedString() argument 228 return toString(i, radix); in toUnsignedString() 230 return switch (radix) { in toUnsignedString() [all …]
|
D | NumberFormatException.java | 63 static NumberFormatException forInputString(String s, int radix) { in forInputString() argument 65 (radix == 10 ? in forInputString() 67 " under radix " + radix)); in forInputString()
|
D | Short.java | 138 public static short parseShort(String s, int radix) in parseShort() argument 140 int i = Integer.parseInt(s, radix); in parseShort() 143 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseShort() 194 public static Short valueOf(String s, int radix) in valueOf() argument 196 return valueOf(parseShort(s, radix)); in valueOf()
|
D | Byte.java | 198 public static byte parseByte(String s, int radix) in parseByte() argument 200 int i = Integer.parseInt(s, radix); in parseByte() 203 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseByte() 254 public static Byte valueOf(String s, int radix) in valueOf() argument 256 return valueOf(parseByte(s, radix)); in valueOf()
|
/libcore/ojluni/src/test/java/lang/Long/ |
D | Unsigned.java | 200 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testToStringUnsigned() 202 String result1 = Long.toUnsignedString(datum, radix); in testToStringUnsigned() 203 String result2 = toUnsignedBigInt(datum).toString(radix); in testToStringUnsigned() 211 if (radix == 10) { in testToStringUnsigned() 220 long parseResult = Long.parseUnsignedLong(result1, radix); in testToStringUnsigned() 227 datum, radix, result1, parseResult)); in testToStringUnsigned() 257 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseUnsignedLong() 258 String bigString = value.toString(radix); in testParseUnsignedLong() 259 long longResult = Long.parseUnsignedLong(bigString, radix); in testParseUnsignedLong() 266 value, radix, bigString, longResult)); in testParseUnsignedLong() [all …]
|
D | ParsingTest.java | 134 private static void checkNumberFormatException(String val, int start, int end, int radix) { in checkNumberFormatException() argument 139 n = Long_parseLong(val, start, end, radix); in checkNumberFormatException() 140 System.err.println("parseLong(" + val + ", " + start + ", " + end + ", " + radix + in checkNumberFormatException() 148 private static void checkIndexOutOfBoundsException(String val, int start, int end, int radix) { in checkIndexOutOfBoundsException() argument 153 n = Long_parseLong(val, start, end, radix); in checkIndexOutOfBoundsException() 154 System.err.println("parseLong(" + val + ", " + start + ", " + end + ", " + radix + in checkIndexOutOfBoundsException() 162 private static void checkNull(int start, int end, int radix) { in checkNull() argument 167 n = Long_parseLong(null, start, end, radix); in checkNull() 168 System.err.println("parseLong(null, " + start + ", " + end + ", " + radix + in checkNull() 176 private static void check(long expected, String val, int start, int end, int radix) { in check() argument [all …]
|
/libcore/ojluni/src/test/java/lang/Integer/ |
D | ParsingTest.java | 142 private static void checkNumberFormatException(String val, int start, int end, int radix) { in checkNumberFormatException() argument 147 n = Integer_parseInt(val, start, end, radix); in checkNumberFormatException() 148 System.err.println("parseInt(" + val + ", " + start + ", " + end + ", " + radix + in checkNumberFormatException() 156 private static void checkIndexOutOfBoundsException(String val, int start, int end, int radix) { in checkIndexOutOfBoundsException() argument 161 n = Integer_parseInt(val, start, end, radix); in checkIndexOutOfBoundsException() 162 System.err.println("parseInt(" + val + ", " + start + ", " + end + ", " + radix + in checkIndexOutOfBoundsException() 170 private static void checkNull(int start, int end, int radix) { in checkNull() argument 175 n = Integer_parseInt(null, start, end, radix); in checkNull() 176 System.err.println("parseInt(null, " + start + ", " + end + ", " + radix + in checkNull() 184 private static void check(int expected, String val, int start, int end, int radix) { in check() argument [all …]
|
D | Unsigned.java | 201 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testToStringUnsigned() 203 String result1 = Integer.toUnsignedString(datum, radix); in testToStringUnsigned() 204 String result2 = Long.toString(Integer.toUnsignedLong(datum), radix); in testToStringUnsigned() 212 if (radix == 10) { in testToStringUnsigned() 221 int parseResult = Integer.parseUnsignedInt(result1, radix); in testToStringUnsigned() 226 datum, radix, result1, parseResult)); in testToStringUnsigned() 251 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) { in testParseUnsignedInt() 252 String longString = Long.toString(value, radix); in testParseUnsignedInt() 253 int intResult = Integer.parseUnsignedInt(longString, radix); in testParseUnsignedInt() 258 value, radix, longString, intResult)); in testParseUnsignedInt() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | IntegerTest.java | 202 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { in testParseUnsignedInt() 205 Integer.parseUnsignedInt(Integer.toUnsignedString(value, radix), radix)); in testParseUnsignedInt() 223 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { in testParseUnsignedInt() 224 final int r = radix; in testParseUnsignedInt() 268 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { in testParseUnsignedIntSubstring() 269 String arb = leftPad + Integer.toUnsignedString(value, radix) + rightPad; in testParseUnsignedIntSubstring() 271 value, Integer.parseUnsignedInt(arb, i, arb.length() - j, radix)); in testParseUnsignedIntSubstring() 301 for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { in testParseUnsignedIntSubstring() 302 final int r = radix; in testParseUnsignedIntSubstring() 304 leftPad + Long.toUnsignedString(large_value, radix) + rightPad; in testParseUnsignedIntSubstring() [all …]
|
D | LongTest.java | 222 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 224 Long.parseUnsignedLong(Long.toUnsignedString(val, radix), radix)); 261 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) { 266 assertTrue(Long.toUnsignedString(val, radix).equals(b.toString(radix)));
|
/libcore/ojluni/src/main/java/java/util/ |
D | Scanner.java | 359 private int radix = 10; field in Scanner 424 String radixDigits = digits.substring(0, radix); in buildIntegerPatternString() 436 String non0RadixDigits = "((?i)[" + digits.substring(1, radix) + "]|(" + non0Digit + "))"; in buildIntegerPatternString() 1348 public int radix() { in radix() method in Scanner 1370 public Scanner useRadix(int radix) { in useRadix() argument 1371 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) in useRadix() 1372 throw new IllegalArgumentException("radix:"+radix); in useRadix() 1374 if (this.defaultRadix == radix) in useRadix() 1377 this.defaultRadix = radix; in useRadix() 1385 private void setRadix(int radix) { in setRadix() argument [all …]
|
/libcore/ojluni/annotations/sdk/nullability/java/lang/ |
D | Integer.annotated.java | 38 @libcore.util.NonNull public static java.lang.String toString(int i, int radix) { throw new Runtime… in toString() argument 40 @libcore.util.NonNull public static java.lang.String toUnsignedString(int i, int radix) { throw new… in toUnsignedString() argument 52 public static int parseInt(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.Nu… in parseInt() argument 56 ….util.NonNull java.lang.CharSequence s, int beginIndex, int endIndex, int radix) throws java.lang.… in parseInt() argument 58 public static int parseUnsignedInt(@libcore.util.NonNull java.lang.String s, int radix) throws java… in parseUnsignedInt() argument 62 ….util.NonNull java.lang.CharSequence s, int beginIndex, int endIndex, int radix) throws java.lang.… in parseUnsignedInt() argument 64 …c java.lang.Integer valueOf(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in valueOf() argument
|
D | Long.annotated.java | 39 @libcore.util.NonNull public static java.lang.String toString(long i, int radix) { throw new Runtim… in toString() argument 41 @libcore.util.NonNull public static java.lang.String toUnsignedString(long i, int radix) { throw ne… in toUnsignedString() argument 53 public static long parseLong(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in parseLong() argument 57 ….util.NonNull java.lang.CharSequence s, int beginIndex, int endIndex, int radix) throws java.lang.… in parseLong() argument 59 public static long parseUnsignedLong(@libcore.util.NonNull java.lang.String s, int radix) throws ja… in parseUnsignedLong() argument 63 ….util.NonNull java.lang.CharSequence s, int beginIndex, int endIndex, int radix) throws java.lang.… in parseUnsignedLong() argument 65 …atic java.lang.Long valueOf(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in valueOf() argument
|
D | Byte.annotated.java | 41 public static byte parseByte(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in parseByte() argument 45 …atic java.lang.Byte valueOf(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in valueOf() argument
|
/libcore/ojluni/annotations/hiddenapi/java/lang/ |
D | Long.java | 43 public static java.lang.String toString(long i, int radix) { in toString() argument 47 public static java.lang.String toUnsignedString(long i, int radix) { in toUnsignedString() argument 91 public static long parseLong(java.lang.String s, int radix) in parseLong() argument 100 public static long parseUnsignedLong(java.lang.String s, int radix) in parseUnsignedLong() argument 110 public static java.lang.Long valueOf(java.lang.String s, int radix) in valueOf() argument
|
D | Integer.java | 44 public static java.lang.String toString(int i, int radix) { in toString() argument 48 public static java.lang.String toUnsignedString(int i, int radix) { in toUnsignedString() argument 88 public static int parseInt(java.lang.String s, int radix) in parseInt() argument 97 public static int parseUnsignedInt(java.lang.String s, int radix) in parseUnsignedInt() argument 106 public static java.lang.Integer valueOf(java.lang.String s, int radix) in valueOf() argument
|
D | Short.java | 46 public static short parseShort(java.lang.String s, int radix) in parseShort() argument 55 public static java.lang.Short valueOf(java.lang.String s, int radix) in valueOf() argument
|
D | Byte.java | 50 public static byte parseByte(java.lang.String s, int radix) in parseByte() argument 59 public static java.lang.Byte valueOf(java.lang.String s, int radix) in valueOf() argument
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ScannerTest.java | 38 assertEquals(8, scanner.radix()); in testReset() 43 assertEquals(10, scanner.radix()); in testReset()
|
/libcore/ojluni/src/main/java/java/math/ |
D | BigInteger.java | 480 public BigInteger(String val, int radix) { in BigInteger() argument 484 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in BigInteger() 510 Character.digit(val.charAt(cursor), radix) == 0) { in BigInteger() 525 long numBits = ((numDigits * bitsPerDigit[radix]) >>> 10) + 1; in BigInteger() 533 int firstGroupLen = numDigits % digitsPerInt[radix]; in BigInteger() 535 firstGroupLen = digitsPerInt[radix]; in BigInteger() 537 magnitude[numWords - 1] = Integer.parseInt(group, radix); in BigInteger() 542 int superRadix = intRadix[radix]; in BigInteger() 545 group = val.substring(cursor, cursor += digitsPerInt[radix]); in BigInteger() 546 groupVal = Integer.parseInt(group, radix); in BigInteger() [all …]
|
/libcore/ojluni/src/test/java/math/BigInteger/ |
D | BigIntegerTest.java | 661 for (int radix=Character.MIN_RADIX; radix < Character.MAX_RADIX; radix++) { in stringConv_generic() 662 String result = x.toString(radix); in stringConv_generic() 663 BigInteger test = new BigInteger(result, radix); in stringConv_generic() 665 "BigInteger toString: "+x+" Test: "+test+" radix: " + radix); in stringConv_generic() 681 for (int radix = Character.MIN_RADIX; radix < Character.MAX_RADIX; radix++) { in stringConv_schoenhage() 682 String result = x.toString(radix); in stringConv_schoenhage() 683 BigInteger test = new BigInteger(result, radix); in stringConv_schoenhage() 685 "BigInteger toString: "+x+" Test: "+test+" radix: " + radix); in stringConv_schoenhage()
|
/libcore/ojluni/src/main/native/ |
D | Character.cpp | 102 Character_digitImpl(JNIEnv* env, jclass, jint codePoint, jint radix) { in Character_digitImpl() argument 103 return u_digit(codePoint, radix); in Character_digitImpl()
|