Package at.meks.validation.matcher
Klasse StringMatcher
java.lang.Object
at.meks.validation.matcher.StringMatcher
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic booleanChecks if a given string value contains another string.static booleancontainsDigitsOnly(String value) Checks if a given string value contains only digits.static booleancontainsNot(String value, String containing) Checks if a given string value does not contain another string.static booleanChecks if a given string value has a specific length.static booleanhasMaxLength(String value, int maxLength) Checks if a given string value has a maximum length.static booleanhasMinLength(String value, int minLength) Checks if a given string value has a minimum length.static booleanisNotBlank(String value) Checks if a given string value is not blank.static booleanisNotEmpty(String value) Checks if a given string value is not empty.
-
Methodendetails
-
isNotBlank
Checks if a given string value is not blank.- Parameter:
value- The string value to check.- Gibt zurück:
- true if the value is not null and not empty after trimming whitespace, false otherwise.
-
isNotEmpty
Checks if a given string value is not empty.- Parameter:
value- The string value to check.- Gibt zurück:
- true if the value is not null and not empty, false otherwise.
-
contains
Checks if a given string value contains another string.- Parameter:
value- The string value to check.containing- The string to check if it is contained in the value.- Gibt zurück:
- true if the value is not null and contains the specified "containing" string, false otherwise.
-
containsNot
Checks if a given string value does not contain another string.- Parameter:
value- The string value to check.containing- The string to check if it is not contained in the value.- Gibt zurück:
trueif the value is not null and does not contain the specified "containing" string,falseotherwise.
-
containsDigitsOnly
Checks if a given string value contains only digits.- Parameter:
value- The string value to check.- Gibt zurück:
trueif the value is not null and contains only digits,falseotherwise.
-
hasMinLength
Checks if a given string value has a minimum length.- Parameter:
value- The string value to check.minLength- The minimum length required for the value.- Gibt zurück:
trueif the value is not null and its length is greater than or equal to the minimum length,falseotherwise.
-
hasMaxLength
Checks if a given string value has a maximum length.- Parameter:
value- The string value to check.maxLength- The maximum length allowed for the value.- Gibt zurück:
trueif the value is not null and its length is less than or equal to the maximum length,falseotherwise.
-
hasLength
Checks if a given string value has a specific length.- Parameter:
value- The string value to check.length- The desired length for the value.- Gibt zurück:
trueif the value is not null and its length is equal to the specified length,falseotherwise.
-