Class StringUtils


  • public final class StringUtils
    extends Object
    This class provides the util methods for string operations.
    • Method Detail

      • assertQualifiedArgument

        public static void assertQualifiedArgument​(String attribute,
                                                   String attributeName)
      • assertQualifiedArgument

        public static void assertQualifiedArgument​(String attribute)
      • isQualifiedString

        public static final boolean isQualifiedString​(String str)
        Checks whether the string is a qualified string or not. A string is a qualified string if it is not null and contains at least one charcter other than blank character.
        Parameters:
        str - the string to inspect.
        Returns:
        Returns true is the string is qualified false otherwise.
      • blankString

        public static final String blankString​(int length)
        Creates an empty string of given length.
        Parameters:
        length - the length of string.
        Returns:
        the empty string.
      • getLastToken

        public static final String getLastToken​(String value,
                                                String delimiter)
        Gets the last token for spcefied dlimiter and string.
        Parameters:
        value - the string to parse
        delimiter - the delimiter used for parsing.
        Returns:
      • objectArrayToString

        public static final String objectArrayToString​(Object[] objectArray)
      • main

        public static void main​(String[] args)