Lines Matching defs:radix

144  * different radix has been set by using the {@link #useRadix} method. The
145 * {@link #reset} method will reset the value of the scanner's radix to
214 * Rmax is the highest digit in the radix being used (for example, Rmax is 9
398 // The current radix used by this scanner
399 private int radix = 10;
401 // The default radix for this scanner
467 String radixDigits = digits.substring(0, radix);
1265 * Returns this scanner's default radix.
1267 * <p>A scanner's radix affects elements of its default
1271 * @return the default radix of this scanner
1273 public int radix() {
1278 * Sets this scanner's default radix to the specified radix.
1280 * <p>A scanner's radix affects elements of its default
1284 * <p>If the radix is less than <code>Character.MIN_RADIX</code>
1288 * <p>Invoking the {@link #reset} method will set the scanner's radix to
1291 * @param radix The radix to use when scanning numbers
1293 * @throws IllegalArgumentException if radix is out of range
1295 public Scanner useRadix(int radix) {
1296 if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX))
1297 throw new IllegalArgumentException("radix:"+radix);
1299 if (this.defaultRadix == radix)
1301 this.defaultRadix = radix;
1302 // Force rebuilding and recompilation of radix dependent patterns
1307 // The next operation should occur in the specified radix but
1309 private void setRadix(int radix) {
1310 if (this.radix != radix) {
1311 // Force rebuilding and recompilation of radix dependent patterns
1313 this.radix = radix;
1830 * interpreted as a byte value in the default radix using the
1843 * interpreted as a byte value in the specified radix using the
1846 * @param radix the radix used to interpret the token as a byte value
1851 public boolean hasNextByte(int radix) {
1852 setRadix(radix);
1859 typeCache = Byte.parseByte(s, radix);
1872 * invocation <tt>nextByte(radix)</tt>, where <code>radix</code>
1873 * is the default radix of this scanner.
1902 * specified radix.
1904 * @param radix the radix used to interpret the token as a byte value
1912 public byte nextByte(int radix) {
1915 && this.radix == radix) {
1920 setRadix(radix);
1927 return Byte.parseByte(s, radix);
1936 * interpreted as a short value in the default radix using the
1940 * short value in the default radix
1949 * interpreted as a short value in the specified radix using the
1952 * @param radix the radix used to interpret the token as a short value
1954 * short value in the specified radix
1957 public boolean hasNextShort(int radix) {
1958 setRadix(radix);
1965 typeCache = Short.parseShort(s, radix);
1978 * invocation <tt>nextShort(radix)</tt>, where <code>radix</code>
1979 * is the default radix of this scanner.
2008 * specified radix.
2010 * @param radix the radix used to interpret the token as a short value
2018 public short nextShort(int radix) {
2021 && this.radix == radix) {
2026 setRadix(radix);
2033 return Short.parseShort(s, radix);
2042 * interpreted as an int value in the default radix using the
2055 * interpreted as an int value in the specified radix using the
2058 * @param radix the radix used to interpret the token as an int value
2063 public boolean hasNextInt(int radix) {
2064 setRadix(radix);
2071 typeCache = Integer.parseInt(s, radix);
2108 * invocation <tt>nextInt(radix)</tt>, where <code>radix</code>
2109 * is the default radix of this scanner.
2138 * specified radix.
2140 * @param radix the radix used to interpret the token as an int value
2148 public int nextInt(int radix) {
2151 && this.radix == radix) {
2156 setRadix(radix);
2163 return Integer.parseInt(s, radix);
2172 * interpreted as a long value in the default radix using the
2185 * interpreted as a long value in the specified radix using the
2188 * @param radix the radix used to interpret the token as a long value
2193 public boolean hasNextLong(int radix) {
2194 setRadix(radix);
2201 typeCache = Long.parseLong(s, radix);
2214 * invocation <tt>nextLong(radix)</tt>, where <code>radix</code>
2215 * is the default radix of this scanner.
2244 * specified radix.
2246 * @param radix the radix used to interpret the token as an int value
2254 public long nextLong(int radix) {
2257 && this.radix == radix) {
2262 setRadix(radix);
2268 return Long.parseLong(s, radix);
2467 * interpreted as a <code>BigInteger</code> in the default radix using the
2481 * interpreted as a <code>BigInteger</code> in the specified radix using
2485 * @param radix the radix used to interpret the token as an integer
2490 public boolean hasNextBigInteger(int radix) {
2491 setRadix(radix);
2498 typeCache = new BigInteger(s, radix);
2512 * invocation <tt>nextBigInteger(radix)</tt>, where <code>radix</code>
2513 * is the default radix of this scanner.
2537 * BigInteger(String, int)} constructor with the specified radix.
2539 * @param radix the radix used to interpret the token
2547 public BigInteger nextBigInteger(int radix) {
2550 && this.radix == radix) {
2555 setRadix(radix);
2562 return new BigInteger(s, radix);