|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.validation.DataTypeValidator
This class provides utility methods for validating data-types
Constructor Summary | |
DataTypeValidator()
|
Method Summary | |
static boolean |
isDigitsOnly(java.lang.String value)
This method checks if the specified String contains only digits. |
static boolean |
isExactLength(java.lang.String value,
int length)
This method checks if the length of the specified string is exactly the required value. |
static boolean |
isLengthGreaterThanOrEqual(java.lang.String value,
int minLength)
This method checks if the length of the specified string is greater than or equal to the specified minimum length. |
static boolean |
isLengthLessThanOrEqual(java.lang.String value,
int maxLength)
This method checks if the length of the specified string is less than or equal to the specified maximum length. |
static boolean |
isLetterOrDigitsOnly(java.lang.String value)
This method checks if the specified String contains only letters or digits If the value is null or zero length then true is returned |
static boolean |
isLetterOrDigitsOrWhiteSpacesOnly(java.lang.String value)
This method checks if the specified String contains only letters or digits or white spaces If the value is null or zero length then true is returned |
static boolean |
isLettersOnly(java.lang.String value)
This method checks if the specified String contains only letters If the value is null or zero length then true is returned |
static boolean |
isNullOrEmpty(java.lang.Object value)
This method will return true if the value is: null an empty string a string containing: null
Otherwise this method will return false |
static boolean |
isNullOrEmpty(java.lang.String value)
This method will return true if the value is: null an empty string a string containing: null
Otherwise this method will return false
This method is optimised for String objects. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataTypeValidator()
Method Detail |
public static boolean isNullOrEmpty(java.lang.Object value)
null
value
- The Value to test
public static boolean isNullOrEmpty(java.lang.String value)
null
value
- The Value to test
public static boolean isLengthLessThanOrEqual(java.lang.String value, int maxLength)
value
- The String to testmaxLength
- The maximum valid length
public static boolean isLengthGreaterThanOrEqual(java.lang.String value, int minLength)
value
- The String to testminLength
- The minimum valid length
public static boolean isExactLength(java.lang.String value, int length)
value
- The String to testlength
- The required length
public static boolean isLetterOrDigitsOnly(java.lang.String value)
value
- The String to test
public static boolean isDigitsOnly(java.lang.String value)
value
- The String to test
public static boolean isLettersOnly(java.lang.String value)
value
- The String to test
public static boolean isLetterOrDigitsOrWhiteSpacesOnly(java.lang.String value)
value
- The String to test
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |