public class Functions extends Object
Constructor and Description |
---|
Functions() |
Modifier and Type | Method and Description |
---|---|
static String |
asIs(String str)
INTERNAL: Returns the string argument as-is.
|
static String |
coalesce(String str1,
String str2)
INTERNAL: Returns the first non-null argument.
|
static String |
coalesce(String str1,
String str2,
String str3)
INTERNAL: Returns the first non-null argument.
|
static String |
coalesceThen(String str1,
String then1)
INTERNAL: Same as coalesce, but will return then-argument instead
of the checked value.
|
static String |
coalesceThen(String str1,
String then1,
String str2,
String then2)
INTERNAL: Same as coalesce, but will return then-argument instead
of the checked value.
|
static String |
convertDate(String date,
String informat,
String outformat)
INTERNAL: Conversion between two date formats.
|
static String |
failIfEmpty(String str,
String message)
INTERNAL: Function will throw an exception with the given message
if the string value is null or empty.
|
static String |
ifEmptyThenElse(String str,
String thenval,
String elseval)
INTERNAL: Checks to see that the string is null or empty.
|
static String |
ifEqualThenElse(String str1,
String str2,
String thenval,
String elseval)
INTERNAL: Compares the first two arguments.
|
static String |
makePSI(String str)
INTERNAL: Turn a string into a suffix suitable for a PSI.
|
static String |
stringReplaceAll(String str,
String regex,
String toValue)
INTERNAL: Replace all occurrences of a regex in a string with a new value.
|
static String |
stripSpaces(String str)
INTERNAL: Returns the string minus all spaces.
|
static String |
substring(String str,
String beginIndex,
String endIndex)
INTERNAL: Returns a substring of the given String.
|
static String |
toLowerCase(String str)
INTERNAL: Lowercases the given String.
|
static String |
toUpperCase(String str)
INTERNAL: Uppercases the given String.
|
static String |
trim(String str)
INTERNAL: Trims the given String.
|
static String |
useFirstIfDifferent(String str1,
String str2)
INTERNAL: Returns the first argument if the two arguments are
different.
|
static String |
useFirstIfEqual(String str1,
String str2)
INTERNAL: Returns the first argument if the two arguments are
equal.
|
public static String asIs(String str)
public static String toUpperCase(String str)
public static String toLowerCase(String str)
public static String trim(String str)
public static String substring(String str, String beginIndex, String endIndex) throws NumberFormatException
NumberFormatException
public static String ifEqualThenElse(String str1, String str2, String thenval, String elseval)
public static String ifEmptyThenElse(String str, String thenval, String elseval)
public static String useFirstIfDifferent(String str1, String str2)
public static String useFirstIfEqual(String str1, String str2)
public static String coalesce(String str1, String str2)
public static String coalesce(String str1, String str2, String str3)
public static String coalesceThen(String str1, String then1)
public static String coalesceThen(String str1, String then1, String str2, String then2)
public static String failIfEmpty(String str, String message)
public static String convertDate(String date, String informat, String outformat)