Home
last modified time | relevance | path

Searched refs:radix (Results 1 – 23 of 23) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerToStringTest.java37 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 …]
DBigIntegerConstructorsTest.java576 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/
DLong.java121 public static String toString(long i, int radix) { in toString() argument
122 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString()
123 radix = 10; in toString()
124 if (radix == 10) in toString()
134 while (i <= -radix) { in toString()
135 buf[charPos--] = Integer.digits[(int)(-(i % radix))]; in toString()
136 i = i / radix; in toString()
173 public static String toUnsignedString(long i, int radix) { in toUnsignedString() argument
175 return toString(i, radix); in toUnsignedString()
177 switch (radix) { in toUnsignedString()
[all …]
DInteger.java131 public static String toString(int i, int radix) { in toString() argument
132 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in toString()
133 radix = 10; in toString()
136 if (radix == 10) { in toString()
148 while (i <= -radix) { in toString()
149 buf[charPos--] = digits[-(i % radix)]; in toString()
150 i = i / radix; in toString()
187 public static String toUnsignedString(int i, int radix) { in toUnsignedString() argument
188 return Long.toUnsignedString(toUnsignedLong(i), radix); in toUnsignedString()
334 int radix = 1 << shift; in formatUnsignedInt() local
[all …]
DShort.java119 public static short parseShort(String s, int radix) in parseShort() argument
121 int i = Integer.parseInt(s, radix); in parseShort()
124 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseShort()
175 public static Short valueOf(String s, int radix) in valueOf() argument
177 return valueOf(parseShort(s, radix)); in valueOf()
DByte.java153 public static byte parseByte(String s, int radix) in parseByte() argument
155 int i = Integer.parseInt(s, radix); in parseByte()
158 "Value out of range. Value:\"" + s + "\" Radix:" + radix); in parseByte()
209 public static Byte valueOf(String s, int radix) in valueOf() argument
211 return valueOf(parseByte(s, radix)); in valueOf()
DCharacter.java6764 public static int digit(char ch, int radix) { in digit() argument
6765 return digit((int)ch, radix); in digit()
6822 public static int digit(int codePoint, int radix) { in digit() argument
6823 if (radix < MIN_RADIX || radix > MAX_RADIX) { in digit()
6836 return result < radix ? result : -1; in digit()
6838 return digitImpl(codePoint, radix); in digit()
6842 native static int digitImpl(int codePoint, int radix); in digitImpl() argument
7342 public static char forDigit(int digit, int radix) { in forDigit() argument
7343 if ((digit >= radix) || (digit < 0)) { in forDigit()
7346 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) { in forDigit()
/libcore/ojluni/src/main/java/java/util/
DScanner.java356 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()
1245 public int radix() { in radix() method in Scanner
1267 public Scanner useRadix(int radix) { in useRadix() argument
1268 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) in useRadix()
1269 throw new IllegalArgumentException("radix:"+radix); in useRadix()
1271 if (this.defaultRadix == radix) in useRadix()
1273 this.defaultRadix = radix; in useRadix()
1281 private void setRadix(int radix) { in setRadix() argument
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DIntegerTest.java206 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) {
208 Integer.parseUnsignedInt(Integer.toUnsignedString(val, radix), radix));
254 for(int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; ++radix) {
255 assertTrue(Integer.toUnsignedString(val, radix)
256 .equals(Long.toString(Integer.toUnsignedLong(val), radix)));
DLongTest.java222 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/annotations/hiddenapi/java/lang/
DLong.java43 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
DInteger.java44 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
DShort.java46 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
DByte.java50 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
DCharacter.java350 public static int digit(char ch, int radix) { in digit() argument
354 public static int digit(int codePoint, int radix) { in digit() argument
358 static native int digitImpl(int codePoint, int radix); in digitImpl() argument
413 public static char forDigit(int digit, int radix) { in forDigit() argument
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DInteger.annotated.java38 @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 public static int parseUnsignedInt(@libcore.util.NonNull java.lang.String s, int radix) throws java… in parseUnsignedInt() argument
60 …c java.lang.Integer valueOf(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in valueOf() argument
DLong.annotated.java39 @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 public static long parseUnsignedLong(@libcore.util.NonNull java.lang.String s, int radix) throws ja… in parseUnsignedLong() argument
61 …atic java.lang.Long valueOf(@libcore.util.NonNull java.lang.String s, int radix) throws java.lang.… in valueOf() argument
DByte.annotated.java41 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
DCharacter.annotated.java165 public static int digit(char ch, int radix) { throw new RuntimeException("Stub!"); } in digit() argument
167 public static int digit(int codePoint, int radix) { throw new RuntimeException("Stub!"); } in digit() argument
191 public static char forDigit(int digit, int radix) { throw new RuntimeException("Stub!"); } in forDigit() argument
/libcore/ojluni/src/main/java/java/math/
DBigInteger.java417 public BigInteger(@NonNull String val, int radix) { in BigInteger() argument
421 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) in BigInteger()
447 Character.digit(val.charAt(cursor), radix) == 0) { in BigInteger()
462 long numBits = ((numDigits * bitsPerDigit[radix]) >>> 10) + 1; in BigInteger()
470 int firstGroupLen = numDigits % digitsPerInt[radix]; in BigInteger()
472 firstGroupLen = digitsPerInt[radix]; in BigInteger()
474 magnitude[numWords - 1] = Integer.parseInt(group, radix); in BigInteger()
479 int superRadix = intRadix[radix]; in BigInteger()
482 group = val.substring(cursor, cursor += digitsPerInt[radix]); in BigInteger()
483 groupVal = Integer.parseInt(group, radix); in BigInteger()
[all …]
/libcore/ojluni/src/main/native/
DCharacter.cpp101 Character_digitImpl(JNIEnv* env, jclass, jint codePoint, jint radix) { in Character_digitImpl() argument
102 return u_digit(codePoint, radix); in Character_digitImpl()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DScannerTest.java592 assertEquals(10, s.radix()); in test_radix()
611 assertEquals(11, s.radix()); in test_useRadix_I()
/libcore/api/
Dcurrent.txt13663 method public int radix();