Crossfire JXClient, Trunk
|
Static Public Member Functions | |
static boolean | parseBoolean (@NotNull final String str) throws IOException |
static< T extends Enum< T > T | parseEnum (@NotNull final Class< T > class_, @NotNull final String name, @NotNull final String ident) throws IOException |
static float | parseFloat (@NotNull final String str) throws IOException |
static int | parseInt (@NotNull final String string, final int defaultValue) |
static int | parseInt (@NotNull final String string, final int defaultValue, final int minValue, final int maxValue) |
static long | parseLong (@NotNull final String string, final long defaultValue) |
Private Member Functions | |
NumberParser () | |
Utility class for parsing strings into numbers.
Definition at line 32 of file NumberParser.java.
|
private |
Private constructor to prevent instantiation.
Definition at line 37 of file NumberParser.java.
|
static |
Parses a boolean constant.
str | the boolean constant string to parse |
IOException | if a parsing error occurs |
Definition at line 109 of file NumberParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseButton(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseCommandText(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseDef(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseDialog(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseQueryText(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseScrollbar(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseSelect(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseSelectableButton(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseText(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseTextButton().
|
static |
Parses an enum constant.
<T> | the enum class |
class_ | the enum class the enum constant belongs to |
name | the enum constant to parse |
ident | the description of the enum class for building error messages |
IOException | if the enum constant does not exist |
Definition at line 128 of file NumberParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseCommandList(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseDialogHide(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseExecSelection(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseInventoryOption(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseLabelNewchar(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseLabelStat(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseLabelStat2(), com.realtime.crossfire.jxclient.skin.io.CommandParser.parseQuestsFilter(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseSpinner().
|
static |
Parses a float constant.
str | the floating constant string to parse |
IOException | if a parsing error occurs |
Definition at line 95 of file NumberParser.java.
Referenced by com.realtime.crossfire.jxclient.skin.io.ParseUtils.parseColorNull(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseDef(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseFill(), com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parseFont(), and com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.parsePicture().
|
static |
Converts a string into an int value.
string | the string to convert |
defaultValue | the value to return if the number is not a string |
Definition at line 46 of file NumberParser.java.
Referenced by com.realtime.crossfire.jxclient.settings.Settings.getInt(), com.realtime.crossfire.jxclient.util.NumberParser.parseInt(), com.realtime.crossfire.jxclient.metaserver.MetaserverEntryParser.parseLine(), and com.realtime.crossfire.jxclient.window.JXCConnection.setHost().
|
static |
Converts a string into an int value in the given bounds.
string | the string to convert |
defaultValue | the value to return if the number is not a string or not within bounds |
minValue | the bound's minimum value |
maxValue | the bound's maximum value |
Definition at line 64 of file NumberParser.java.
References com.realtime.crossfire.jxclient.util.NumberParser.parseInt().
|
static |
Converts a string into a long value.
string | the string to convert |
defaultValue | the value to return if the number is not a string |
Definition at line 80 of file NumberParser.java.
Referenced by com.realtime.crossfire.jxclient.settings.Settings.getLong(), and com.realtime.crossfire.jxclient.metaserver.MetaserverEntryParser.parseLine().