public class NumberParser extends Object
This class originally stems form the book "Performant Java Programmieren" by Hendrik Schreiber
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_NEGATIVE_INTEGER_CHARS |
static int |
MAX_NEGATIVE_LONG_CHARS |
static int |
MAX_POSITIVE_INTEGER_CHARS |
static int |
MAX_POSITIVE_LONG_CHARS |
| Constructor and Description |
|---|
NumberParser() |
| Modifier and Type | Method and Description |
|---|---|
static double |
parseDouble(String s) |
static double |
parseDouble(String s,
int offset,
int length) |
static int |
parseInt(char[] cb,
int offset,
int length) |
static int |
parseInt(String s) |
static int |
parseInt(String s,
int offset,
int length) |
static long |
parseLong(char[] cb,
int offset,
int length) |
static long |
parseLong(String s) |
static long |
parseLong(String s,
int offset,
int length) |
public static final int MAX_NEGATIVE_INTEGER_CHARS
public static final int MAX_POSITIVE_INTEGER_CHARS
public static final int MAX_NEGATIVE_LONG_CHARS
public static final int MAX_POSITIVE_LONG_CHARS
public static int parseInt(char[] cb,
int offset,
int length)
throws NumberFormatException
NumberFormatExceptionpublic static int parseInt(String s) throws NumberFormatException
NumberFormatExceptionpublic static int parseInt(String s, int offset, int length) throws NumberFormatException
NumberFormatExceptionpublic static long parseLong(String s) throws NumberFormatException
NumberFormatExceptionpublic static long parseLong(String s, int offset, int length) throws NumberFormatException
NumberFormatExceptionpublic static long parseLong(char[] cb,
int offset,
int length)
throws NumberFormatException
NumberFormatExceptionpublic static double parseDouble(String s, int offset, int length)
public static double parseDouble(String s)
Copyright © 2019. All rights reserved.