| java.lang.Object com.google.gwt.http.client.StringValidator
StringValidator | final class StringValidator (Code) | | Utility class for validating strings.
TODO(mmendez): Is there a better place for this?
|
isEmptyOrNullString | public static boolean isEmptyOrNullString(String string)(Code) | | Returns true if the string is empty or null.
Parameters: string - to test if null or empty true if the string is empty or null |
throwIfEmptyOrNull | public static void throwIfEmptyOrNull(String name, String value)(Code) | | Throws if value is null or empty. This method
ignores leading and trailing whitespace.
Parameters: name - the name of the value, used in error messages Parameters: value - the string value that needs to be validated throws: IllegalArgumentException - if the string is empty, or all whitespace throws: NullPointerException - if the string is null |
throwIfNull | public static void throwIfNull(String name, String value)(Code) | | Throws a
NullPointerException if the value is null .
Parameters: name - the name of the value, used in error messages Parameters: value - the string value that needs to be validated throws: NullPointerException - if the value is null |
|
|