PaP
Class Util
java.lang.Object
|
+--PaP.Util
- All Implemented Interfaces:
- java.io.Serializable
- public class Util
- extends java.lang.Object
- implements java.io.Serializable
Small utilities for the PaP support functions
- See Also:
- Serialized Form
Constructor Summary |
Util()
|
Method Summary |
static java.lang.String |
boolToString(boolean b)
Convert to textual representation of boolean values |
static java.lang.String[] |
concatStringArrays(java.lang.String[] first,
java.lang.String[] second)
Function to concatenate string arrays. |
static java.lang.String |
exceptionDump(java.lang.Exception ex)
Function to convert an exception stack dump to a string representation |
static boolean |
stringToBool(java.lang.String s)
Conversion from string boolean representation to boolean value |
static java.lang.String |
toString(java.lang.String[] pStrings,
java.lang.String separator)
Converts an array of Strings into one concatenated String with a specified separator String in between |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Util
public Util()
toString
public static java.lang.String toString(java.lang.String[] pStrings,
java.lang.String separator)
- Converts an array of Strings into one concatenated String with a specified separator String in between
- Parameters:
pStrings
- To array of Strings to be concatenatedseparator
- A String to be placed in between- Returns:
- The concatenated String
boolToString
public static java.lang.String boolToString(boolean b)
- Convert to textual representation of boolean values
- Parameters:
b
- The boolean value to convert- Returns:
- The converted boolean value, true gives "true", "false" else.
stringToBool
public static boolean stringToBool(java.lang.String s)
- Conversion from string boolean representation to boolean value
- Parameters:
s
- The string boolean value to convert- Returns:
- Converted boolean value, "true" gives true, false else.
concatStringArrays
public static java.lang.String[] concatStringArrays(java.lang.String[] first,
java.lang.String[] second)
- Function to concatenate string arrays.
- Parameters:
first
- First arraysecond
- Second array- Returns:
- New array that is the concatenation of the first and second array
exceptionDump
public static java.lang.String exceptionDump(java.lang.Exception ex)
- Function to convert an exception stack dump to a string representation
- Parameters:
ex
- The exception to retrieve the trace from- Returns:
- The converted string representation