java.lang.Object
es.juntadeandalucia.afirma.client.util.signatureFormat.UtilsStringChar

public final class UtilsStringChar extends Object

Class that provides functionality for managing strings and characters.

Project:

Horizontal platform of validation services of multiPKI certificates and electronic signature.

Version:
1.0, 03/03/2011.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char[]
    Constant attribute that represents the array with all the characters defined as constants in this class.
    static final String
    Constant attribute that represents the string to identify the empty string.
    static final char
    Constant attribute that represents the string to identify the blank space character.
    static final char
    Constant attribute that represents the string to identify the line break character.
    static final char
    Constant attribute that represents the string to identify the line start character.
    static final char
    Constant attribute that represents the string to identify the tabulation character.
    static final char
    Constant attribute that represents the string to identify the symbol: :.
    static final char
    Constant attribute that represents the string to identify the symbol: =.
    static final char
    Constant attribute that represents the string to identify the symbol: #.
    static final char
    Constant attribute that represents the string to identify the symbol: ;.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Method that checks whether a string contains some of the characters contained in CHARACTERS_SET (true) or not (false).
    static boolean
    containsSomeOfTheCharacterSetInTheSet(String str, char[] characterSet)
    Method that checks whether a string contains some of the characters contained in certain characters array (true) or not (false).
    static boolean
    Method that checks whether a string is null or empty.
    static boolean
    Method that checks whether a string is null or empty after to apply the method String.trim() on.

    Methods inherited from class java.lang.Object

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

    • EMPTY_STRING

      public static final String EMPTY_STRING
      Constant attribute that represents the string to identify the empty string.
      See Also:
    • SPECIAL_BLANK_SPACE

      public static final char SPECIAL_BLANK_SPACE
      Constant attribute that represents the string to identify the blank space character.
      See Also:
    • SPECIAL_LINE_BREAK

      public static final char SPECIAL_LINE_BREAK
      Constant attribute that represents the string to identify the line break character.
      See Also:
    • SPECIAL_LINE_START

      public static final char SPECIAL_LINE_START
      Constant attribute that represents the string to identify the line start character.
      See Also:
    • SPECIAL_TABULATION

      public static final char SPECIAL_TABULATION
      Constant attribute that represents the string to identify the tabulation character.
      See Also:
    • SYMBOL_PAD

      public static final char SYMBOL_PAD
      Constant attribute that represents the string to identify the symbol: #.
      See Also:
    • SYMBOL_COLON

      public static final char SYMBOL_COLON
      Constant attribute that represents the string to identify the symbol: :.
      See Also:
    • SYMBOL_SEMICOLON

      public static final char SYMBOL_SEMICOLON
      Constant attribute that represents the string to identify the symbol: ;.
      See Also:
    • SYMBOL_EQUAL

      public static final char SYMBOL_EQUAL
      Constant attribute that represents the string to identify the symbol: =.
      See Also:
    • CHARACTERS_SET

      public static final char[] CHARACTERS_SET
      Constant attribute that represents the array with all the characters defined as constants in this class.
  • Method Details

    • isNullOrEmpty

      public static boolean isNullOrEmpty(String str)
      Method that checks whether a string is null or empty.
      Parameters:
      str - Parameter that represents the string to process.
      Returns:
      a boolean with true value whether the string is null or empty, or false value in another case.
    • isNullOrEmptyTrim

      public static boolean isNullOrEmptyTrim(String str)
      Method that checks whether a string is null or empty after to apply the method String.trim() on.
      Parameters:
      str - Parameter that represents the string to process.
      Returns:
      a boolean with true value whether the string is null or empty, or false value in another case.
    • containsSomeOfTheCharacterSet

      public static boolean containsSomeOfTheCharacterSet(String str)
      Method that checks whether a string contains some of the characters contained in CHARACTERS_SET (true) or not (false).
      Parameters:
      str - Parameter that represents the string to process.
      Returns:
      a boolean that indicates whether a string contains some of the characters contained in CHARACTERS_SET (true) or not (false).
    • containsSomeOfTheCharacterSetInTheSet

      public static boolean containsSomeOfTheCharacterSetInTheSet(String str, char[] characterSet)
      Method that checks whether a string contains some of the characters contained in certain characters array (true) or not (false).
      Parameters:
      str - Parameter that represents the string to process.
      characterSet - Parameter that represents the characters array to process.
      Returns:
      a boolean that indicates whether a string contains some of the characters contained in certain characters array (true) or not (false).