| java.lang.Object org.kuali.module.pdp.utilities.GeneralUtilities
GeneralUtilities | public class GeneralUtilities (Code) | | author: HSTAPLET |
Method Summary | |
public static String | convertBigDecimalToString(BigDecimal bd) | public static String | convertDateToString(Date d) | public static String | convertIntegerToString(Integer i) | public static String | convertLongToString(Long l) | public static BigDecimal | convertStringToBigDecimal(String s) | public static Date | convertStringToDate(String s) | public static Integer | convertStringToInteger(String s) | public static Long | convertStringToLong(String s) | public static String | formatStringWithoutGivenChar(String myString, char removeChar) formatStringWithoutGivenChar takes a String and removes the given char out of the string. | public static int | getParameterInteger(ParameterService parameterService, Class componentClass, String parm) | public static int | getParameterInteger(ParameterService parameterService, Class componentClass, String parm, int defaultValue) | public static boolean | isRegexMatch(String regex, String input) | public static boolean | isStringAllNumbers(String field) Method to check if a String field is all numbers. | public static boolean | isStringAllNumbersOrACharacter(String string, char c) Method to check if a String field is all numbers or a given character. | public static boolean | isStringAllNumbersOrASingleCharacter(String string, char c) Method to check if a String field is all numbers or a given character. | public static boolean | isStringAllNumbersOrLetters(String field) Method to check if a String field is all numbers or letters. | public static boolean | isStringEmpty(String field) Method to check if a String field is null or an empty string. | public static boolean | isStringFieldAtMostNLength(String field, int nLength) Method to check if a String field is n chars long. | public static boolean | isStringFieldNLength(String field, int nLength) Method to check if a String field is n chars long. | public static boolean | isUsZipCodeValid(String test) | public static int | numberOfOccurences(String string, char x) Method to check how many times char x occurs in the given String. | public static String | whichButtonWasPressed(HttpServletRequest request) Method to return the name of the button that was pressed. |
formatStringWithoutGivenChar | public static String formatStringWithoutGivenChar(String myString, char removeChar)(Code) | | formatStringWithoutGivenChar takes a String and removes the given char out of the string. (i.e. remove commas: ',')
Parameters: myString - string to be formatted Parameters: removeChar - char to be removed from string String formatted string |
isStringAllNumbers | public static boolean isStringAllNumbers(String field)(Code) | | Method to check if a String field is all numbers. Return true if String is numeric, otherwise return false.
NOTE: This returns true if the string is all spaces which is probably bad but since it is used
so many places, I'm not changing it now.
|
isStringAllNumbersOrACharacter | public static boolean isStringAllNumbersOrACharacter(String string, char c)(Code) | | Method to check if a String field is all numbers or a given character. Return true if String is numbers and the given
character, otherwise return false.
|
isStringAllNumbersOrASingleCharacter | public static boolean isStringAllNumbersOrASingleCharacter(String string, char c)(Code) | | Method to check if a String field is all numbers or a given character. Return true if String is numbers and the given
character, otherwise return false.
|
isStringAllNumbersOrLetters | public static boolean isStringAllNumbersOrLetters(String field)(Code) | | Method to check if a String field is all numbers or letters. Return true if String is numeric/alphabetic, otherwise return
false.
|
isStringEmpty | public static boolean isStringEmpty(String field)(Code) | | Method to check if a String field is null or an empty string. Return true if String is empty, otherwise return false.
|
isStringFieldAtMostNLength | public static boolean isStringFieldAtMostNLength(String field, int nLength)(Code) | | Method to check if a String field is n chars long. Return true if String is n chars long, otherwise return false.
|
isStringFieldNLength | public static boolean isStringFieldNLength(String field, int nLength)(Code) | | Method to check if a String field is n chars long. Return true if String is n chars long, otherwise return false.
|
isUsZipCodeValid | public static boolean isUsZipCodeValid(String test)(Code) | | |
numberOfOccurences | public static int numberOfOccurences(String string, char x)(Code) | | Method to check how many times char x occurs in the given String. Return the number of occurences.
|
whichButtonWasPressed | public static String whichButtonWasPressed(HttpServletRequest request)(Code) | | Method to return the name of the button that was pressed. Returns the full name.
|
|
|