|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.duraspace.fcrepo.cloudsync.service.util.StringUtil
public final class StringUtil
| Method Summary | |
|---|---|
static String |
normalize(String val)
Normalizes the given string by trimming it if non-null and returning null if null or empty. |
static String |
validate(String name,
String value)
|
static String |
validate(String name,
String value,
int maxLen)
Checks that the given value's normalized length is in the allowed range. |
static String |
validate(String name,
String value,
String[] validValues)
Checks that the given value's normalized form is one of the allowed values. |
static String |
validateInt(String name,
String value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String normalize(String val)
val - the string value to normalize.
public static String validate(String name,
String value,
int maxLen)
throws IllegalArgumentException
name - the name of the property being checked, for error reporting.value - the value.maxLen - the maximum length allowed.
IllegalArgumentException - if the normalized value is null,
zero-length, or exceeds the maximum length specified.
public static String validate(String name,
String value,
String[] validValues)
throws IllegalArgumentException
name - the name of the property being checked, for error reporting.value - the value.validValues - the allowed values.
IllegalArgumentException - if the normalized value is null,
zero-length, or not one of the allowed values.
public static String validate(String name,
String value)
throws IllegalArgumentException
IllegalArgumentException
public static String validateInt(String name,
String value)
throws IllegalArgumentException
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||