Object StringUtil

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static StringUtil INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static String normalize(String value, Character additionalCharsToReplace) Removes empty spaces and any additional specified characters.
      final Boolean isDigitsAndSeparatorsOnly(String value, Character separators) Check if the string only contains number and the specified separator characters.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • normalize

         final static String normalize(String value, Character additionalCharsToReplace)

        Removes empty spaces and any additional specified characters.

        Parameters:
        value - The string to be normalized.
        additionalCharsToReplace - Additional characters to be removed.
        Returns:

        The original string normalized to remove specified characters.

      • isDigitsAndSeparatorsOnly

         final Boolean isDigitsAndSeparatorsOnly(String value, Character separators)

        Check if the string only contains number and the specified separator characters.

        Parameters:
        value - The string to be checked.
        separators - The optional accepted separators.
        Returns:

        If the string is only numbers and separators.