Klasse StringMatcher

java.lang.Object
at.meks.validation.matcher.StringMatcher

public class StringMatcher extends Object
  • Methodendetails

    • isNotBlank

      public static boolean isNotBlank(String value)
      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

      public static boolean isNotEmpty(String value)
      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

      public static boolean contains(String value, String containing)
      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

      public static boolean containsNot(String value, String containing)
      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:
      true if the value is not null and does not contain the specified "containing" string, false otherwise.
    • containsDigitsOnly

      public static boolean containsDigitsOnly(String value)
      Checks if a given string value contains only digits.
      Parameter:
      value - The string value to check.
      Gibt zurück:
      true if the value is not null and contains only digits, false otherwise.
    • hasMinLength

      public static boolean hasMinLength(String value, int minLength)
      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:
      true if the value is not null and its length is greater than or equal to the minimum length, false otherwise.
    • hasMaxLength

      public static boolean hasMaxLength(String value, int maxLength)
      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:
      true if the value is not null and its length is less than or equal to the maximum length, false otherwise.
    • hasLength

      public static boolean hasLength(String value, int length)
      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:
      true if the value is not null and its length is equal to the specified length, false otherwise.