|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmodel.util.GeneralUtils
public class GeneralUtils
This class contains various utility methods that are used throughout the program.
| Constructor Summary | |
|---|---|
GeneralUtils()
|
|
| Method Summary | |
|---|---|
static String |
genDataSet(String key,
String data)
This method will create a set of XML tags with the proper new lines and the given data inbetween. |
static String |
parseDataSet(String key,
String data)
This method will take a set of data, and find the first instance of the given key. |
static String[] |
parseDataSets(String key,
String data)
This method will search through a set a data and pull out the data every time a key pair occurs. |
static String |
shortToString(short value)
This method takes a short value (ranged 0 to 255) and converts it to a String (ranged 0 to 100). |
static short |
stringToShort(String value)
This method takes in a string (that should be between 0 and 100) and returns a short with a range of 0 to 255. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralUtils()
| Method Detail |
|---|
public static short stringToShort(String value)
value - The string to convert.
public static String shortToString(short value)
value - The short value, range 0 to 255, or negative.
public static String genDataSet(String key,
String data)
key - The key to use inside the XML tags.data - The data to put between the tags.
public static String parseDataSet(String key,
String data)
key - The XML tag key.data - The data to search through.
public static String[] parseDataSets(String key,
String data)
key - The XML key to search for.data - The data to search in.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||