Class TextTools

java.lang.Object
rife.bld.extension.tools.TextTools

public final class TextTools extends Object
Text Tools.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks if a character sequence is null, empty, or contains only whitespace characters.
    static boolean
    isBlank(CharSequence... strings)
    Checks if all character sequences are null, empty, or contain only whitespace characters.
    static boolean
    isBlank(Object... strings)
    Checks if all string objects are null, empty, or contain only whitespace characters.
    static boolean
    Checks if a character sequence is null or empty.
    static boolean
    isEmpty(CharSequence... strings)
    Checks if all character sequences are null or empty.
    static boolean
    isEmpty(Object... strings)
    Checks if all string objects are null or their string representations are empty.
    static boolean
    Checks if a character sequence is not null, not empty, and not whitespace-only.
    static boolean
    Checks if all character sequences are not null, not empty, and not whitespace-only.
    static boolean
    isNotBlank(Object... strings)
    Checks if all string objects are not null, not empty, and not whitespace-only.
    static boolean
    Checks if a character sequence is not null and not empty.
    static boolean
    Checks if all character sequences are not null and not empty.
    static boolean
    isNotEmpty(Object... strings)
    Checks if all string objects are not null and their string representations are not empty.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isBlank

      public static boolean isBlank(CharSequence str)
      Checks if a character sequence is null, empty, or contains only whitespace characters.
      Parameters:
      str - The character sequence to check
      Returns:
      true if the character sequence is null, empty, or whitespace-only; false otherwise.
      Since:
      1.0
    • isBlank

      public static boolean isBlank(CharSequence... strings)
      Checks if all character sequences are null, empty, or contain only whitespace characters.
      Parameters:
      strings - The character sequences to check
      Returns:
      true if all character sequences are null, empty, or whitespace-only; false otherwise
      Since:
      1.0
    • isBlank

      public static boolean isBlank(Object... strings)
      Checks if all string objects are null, empty, or contain only whitespace characters.

      If an object is not null, it will be converted to its string representation for the check.

      Parameters:
      strings - The string objects to check
      Returns:
      true if all string objects are null, their string representations are empty, or their string representations are whitespace-only; false otherwise
      Since:
      1.0
    • isEmpty

      public static boolean isEmpty(Object... strings)
      Checks if all string objects are null or their string representations are empty.
      Parameters:
      strings - The string objects to check
      Returns:
      true if all objects are null or their string representations are empty; false otherwise
      Since:
      1.0
    • isEmpty

      public static boolean isEmpty(CharSequence str)
      Checks if a character sequence is null or empty.
      Parameters:
      str - The character sequence to check
      Returns:
      true if the character sequence is null or empty; false otherwise
      Since:
      1.0
    • isEmpty

      public static boolean isEmpty(CharSequence... strings)
      Checks if all character sequences are null or empty.
      Parameters:
      strings - The character sequences to check
      Returns:
      true if all character sequences are null or empty; false otherwise
      Since:
      1.0
    • isNotBlank

      public static boolean isNotBlank(CharSequence... strings)
      Checks if all character sequences are not null, not empty, and not whitespace-only.
      Parameters:
      strings - The character sequences to check
      Returns:
      true if all character sequences are not null, not empty, and not whitespace-only; false otherwise
      Since:
      1.0
    • isNotBlank

      public static boolean isNotBlank(Object... strings)
      Checks if all string objects are not null, not empty, and not whitespace-only.

      If an object is not null, it will be converted to its string representation for the check.

      Parameters:
      strings - The string objects to check
      Returns:
      true if all objects are not null, their string representations are not empty, and their string representations are not whitespace-only; false otherwise
      Since:
      1.0
    • isNotBlank

      public static boolean isNotBlank(CharSequence str)
      Checks if a character sequence is not null, not empty, and not whitespace-only.
      Parameters:
      str - The character sequence to check
      Returns:
      true if the character sequence is not null, not empty, and not whitespace-only; false otherwise
      Since:
      1.0
    • isNotEmpty

      public static boolean isNotEmpty(CharSequence... strings)
      Checks if all character sequences are not null and not empty.
      Parameters:
      strings - The character sequences to check
      Returns:
      true if all character sequences are not null and not empty; false otherwise
      Since:
      1.0
    • isNotEmpty

      public static boolean isNotEmpty(CharSequence str)
      Checks if a character sequence is not null and not empty.
      Parameters:
      str - The character sequence to check
      Returns:
      true if the character sequence is not null and not empty; false otherwise
      Since:
      1.0
    • isNotEmpty

      public static boolean isNotEmpty(Object... strings)
      Checks if all string objects are not null and their string representations are not empty.
      Parameters:
      strings - The string objects to check
      Returns:
      true if all string objects are not null and their string representations are not empty; false otherwise
      Since:
      1.0