- java.lang.Object
-
- de.carne.util.validation.InputValidator<@NonNull java.lang.String>
-
- de.carne.util.validation.StringValidator
-
- All Implemented Interfaces:
java.util.function.Supplier<java.lang.String>
public class StringValidator extends InputValidator<@NonNull java.lang.String>
InputValidator implementation for String input.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringValidatorcheckNotEmpty(@Nullable java.lang.String input, ValidationMessage message)Checks that an input value is not empty.-
Methods inherited from class de.carne.util.validation.InputValidator
check, checkNotNull, convert, get, input
-
-
-
-
Method Detail
-
checkNotEmpty
public static StringValidator checkNotEmpty(@Nullable java.lang.String input, ValidationMessage message) throws ValidationException
Checks that an input value is not empty.- Parameters:
input- the input value to check.message- the validation message to create in case the validation fails.- Returns:
- a new StringValidator instance for further validation steps.
- Throws:
ValidationException- if the validation fails.
-
-