Class StringUtils

java.lang.Object
org.axonframework.common.StringUtils

public final class StringUtils extends Object
Utility methods for when dealing with Strings.
Since:
4.5
Author:
Steven van Beelen
  • Method Details

    • nonEmptyOrNull

      public static boolean nonEmptyOrNull(String s)
      Validate whether the given String s is not null and not empty (where empty is defined as "").
      Parameters:
      s - the String to validate whether it is not null and not empty
      Returns:
      true if the given String s is not null and not empty, false otherwise
    • emptyOrNull

      public static boolean emptyOrNull(String s)
      Validate whether the given String s is null or not empty (where empty is defined as "").
      Parameters:
      s - The String to validate whether it is null or empty.
      Returns:
      true if the given String s is not null and not empty, false otherwise.
    • nonEmpty

      public static boolean nonEmpty(String s)
      Validate whether the given String s not empty (where empty is defined as "").
      Parameters:
      s - the String to validate whether not empty
      Returns:
      true if the given String s is not empty, false otherwise
    • lowerCaseFirstCharacterOf

      public static String lowerCaseFirstCharacterOf(String s)
      Return the given s, with its first character lowercase.
      Parameters:
      s - The input string to adjust to a version with the first character as a lowercase.
      Returns:
      The input string, with first character lowercase.
    • capitalize

      public static String capitalize(@Nullable String string)
      Return the given string, with its first character uppercase.
      Parameters:
      string - The input string to adjust to a version with the first character as uppercase.
      Returns:
      The input string, with first character in uppercase.