Home | History | Annotate | Download | only in lang

Lines Matching defs:radix

89      * radix specified by the second argument.
91 * <p>If the radix is smaller than {@code Character.MIN_RADIX}
92 * or larger than {@code Character.MAX_RADIX}, then the radix
113 * {@code '\u005Cu007A'}. If {@code radix} is
115 * are used as radix-<var>N</var> digits in the order shown. Thus,
116 * the digits for hexadecimal (radix 16) are
126 * @param radix the radix to use in the string representation.
127 * @return a string representation of the argument in the specified radix.
131 public static String toString(int i, int radix) {
132 if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)
133 radix = 10;
136 if (radix == 10) {
148 while (i <= -radix) {
149 buf[charPos--] = digits[-(i % radix)];
150 i = i / radix;
163 * unsigned integer value in the radix specified by the second
166 * <p>If the radix is smaller than {@code Character.MIN_RADIX}
167 * or larger than {@code Character.MAX_RADIX}, then the radix
182 * @param radix the radix to use in the string representation.
183 * @return an unsigned string representation of the argument in the specified radix.
187 public static String toUnsignedString(int i, int radix) {
188 return Long.toUnsignedString(toUnsignedLong(i), radix);
334 int radix = 1 << shift;
335 int mask = radix - 1;
398 * argument and radix 10 were given as arguments to the {@link
445 * and returned as a string exactly as if the argument and radix
512 * Parses the string argument as a signed integer in the radix
514 * must all be digits of the specified radix (as determined by
528 * <li>The radix is either smaller than
533 * radix, except that the first character may be a minus sign
560 * @param radix the radix to be used while parsing {@code s}.
562 * specified radix.
566 public static int parseInt(String s, int radix)
580 if (radix < Character.MIN_RADIX) {
581 throw new NumberFormatException("radix " + radix +
585 if (radix > Character.MAX_RADIX) {
586 throw new NumberFormatException("radix " + radix +
610 multmin = limit / radix;
613 digit = Character.digit(s.charAt(i++),radix);
620 result *= radix;
639 * returned, exactly as if the argument and the radix 10 were
654 * Parses the string argument as an unsigned integer in the radix
660 * specified radix (as determined by whether {@link
672 * <li>The radix is either smaller than
677 * radix, except that the first character may be a plus sign
689 * @param radix the radix to be used while parsing {@code s}.
691 * specified radix.
696 public static int parseUnsignedInt(String s, int radix)
711 (radix == 10 && len <= 9) ) { // Integer.MAX_VALUE in base 10 is 10 digits
712 return parseInt(s, radix);
714 long ell = Long.parseLong(s, radix);
734 * is returned, exactly as if the argument and the radix 10 were
752 * with the radix given by the second argument. The first argument
753 * is interpreted as representing a signed integer in the radix
763 * {@code new Integer(Integer.parseInt(s, radix))}
767 * @param radix the radix to be used in interpreting {@code s}
770 * radix.
774 public static Integer valueOf(String s, int radix) throws NumberFormatException {
775 return Integer.valueOf(parseInt(s,radix));
893 * {@code parseInt} method for radix 10.
1110 * {@link #valueOf(java.lang.String, int)} with radix 16.
1114 * {@link #valueOf(java.lang.String, int)} with radix 8.
1117 * with radix 10.
1174 * sign and/or radix specifier ("{@code 0x}", "{@code 0X}",
1176 * Integer.parseInt} method with the indicated radix (10, 16, or
1191 int radix = 10;
1206 // Handle radix specifier, if present
1209 radix = 16;
1213 radix = 16;
1217 radix = 8;
1224 result = Integer.valueOf(nm.substring(index), radix);
1232 result = Integer.valueOf(constant, radix);