java.lang.Objectcom.realtime.crossfire.jxclient.skin.io.ParseUtils
public class ParseUtils
Utility class for parsing string parameters into values.
| Constructor Summary | |
|---|---|
private |
ParseUtils()
Private constructor to prevent instantiation. |
| Method Summary | |
|---|---|
static CheckBoxOption |
parseCheckBoxOption(java.lang.String name,
OptionManager optionManager)
Parses a check box option name. |
static java.awt.Color |
parseColor(java.lang.String name)
Parses a color name. |
private static java.awt.Color |
parseColorName(java.lang.String name)
Parses a color name. |
static java.awt.Color |
parseColorNull(java.lang.String name)
Parses a color name, optionally followed by "/<alpha>". |
static Orientation |
parseOrientation(java.lang.String name)
Parses an orientation value. |
static int |
parseStat(java.lang.String name)
Parses a stat value. |
static java.lang.String |
parseText(Args args,
java.io.LineNumberReader lnr)
Concatenates trailing arguments into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private ParseUtils()
| Method Detail |
|---|
@NotNull
public static CheckBoxOption parseCheckBoxOption(@NotNull
java.lang.String name,
@NotNull
OptionManager optionManager)
throws java.io.IOException
name - the check box option name to parseoptionManager - the option manager to use
java.io.IOException - if the check box option name does not exist
@NotNull
public static java.awt.Color parseColor(@NotNull
java.lang.String name)
throws java.io.IOException
name - the color name to parse
java.io.IOException - if the color name does not exist
@Nullable
private static java.awt.Color parseColorName(@NotNull
java.lang.String name)
name - the color name to parse
null if the color name does not exist
@Nullable
public static java.awt.Color parseColorNull(@NotNull
java.lang.String name)
name - the color name to parse
null if the color name does not exist
@NotNull
public static Orientation parseOrientation(@NotNull
java.lang.String name)
throws java.io.IOException
name - the orientation value to parse
java.io.IOException - if the orientation value does not exist
public static int parseStat(@NotNull
java.lang.String name)
throws java.io.IOException
name - the stat value to parse
java.io.IOException - if the stat value does not exist
@NotNull
public static java.lang.String parseText(@NotNull
Args args,
@NotNull
java.io.LineNumberReader lnr)
throws java.io.IOException
args - the args to concatenatelnr - where to read additional lines from
java.io.IOException - if reading from lnr fails