|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjwo.utils.dbase.NumberParser
public final class NumberParser
Various number parsing utilities. This code is based on the class provided as part of the Geotools OpenSource mapping toolkit - www.geotools.org/ under the GNU Lesser General Public License.
| Constructor Summary | |
|---|---|
NumberParser()
Creates a new parser. |
|
| Method Summary | |
|---|---|
double |
parseDouble(CharSequence s,
int start,
int end)
Parses a given block of text represented as a character sequence and extracts a double value from it. |
double |
parseDouble(String s)
Parses a given block of text and extracts a double value from it. |
int |
parseInt(CharSequence s,
int start,
int end)
Parses a given block of text represented as a character sequence and extracts an integer value from it. |
int |
parseInt(String s)
Parses a given block of text and extracts an integer value from it. |
long |
parseLong(CharSequence s,
int start,
int end)
Parses a given block of text represented as a character sequence and extracts a long value from it. |
long |
parseLong(String s)
Parses a given block of text and extracts a long value from it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NumberParser()
| Method Detail |
|---|
public int parseInt(String s)
throws NumberFormatException
s - String to parse.
NumberFormatException - If problem extracting integer from text.
public int parseInt(CharSequence s,
int start,
int end)
throws NumberFormatException
s - Character sequence to parse.start - Index of start of character sequence marking section to parse.end - Index of end of character sequence marking section to parse.
NumberFormatException - If problem extracting integer from character sequence.public long parseLong(String s)
s - String to parse.
NumberFormatException - If problem extracting long from text.
public long parseLong(CharSequence s,
int start,
int end)
throws NumberFormatException
s - Character sequence to parse.start - Index of start of character sequence marking section to parse.end - Index of end of character sequence marking section to parse.
NumberFormatException - If problem extracting long from character sequence.
public double parseDouble(String s)
throws NumberFormatException
s - String to parse.
NumberFormatException - If problem extracting double from text.
public double parseDouble(CharSequence s,
int start,
int end)
throws NumberFormatException
s - Character sequence to parse.start - Index of start of character sequence marking section to parse.end - Index of end of character sequence marking section to parse.
NumberFormatException - If problem extracting double from character sequence.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||