Class UtilsStringChar
java.lang.Object
es.juntadeandalucia.afirma.client.util.signatureFormat.UtilsStringChar
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
FieldsModifier and TypeFieldDescriptionstatic final char[]Constant attribute that represents the array with all the characters defined as constants in this class.static final StringConstant attribute that represents the string to identify the empty string.static final charConstant attribute that represents the string to identify the blank space character.static final charConstant attribute that represents the string to identify the line break character.static final charConstant attribute that represents the string to identify the line start character.static final charConstant attribute that represents the string to identify the tabulation character.static final charConstant attribute that represents the string to identify the symbol::.static final charConstant attribute that represents the string to identify the symbol:=.static final charConstant attribute that represents the string to identify the symbol:#.static final charConstant attribute that represents the string to identify the symbol:;. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanMethod that checks whether a string contains some of the characters contained inCHARACTERS_SET(true) or not (false).static booleancontainsSomeOfTheCharacterSetInTheSet(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 booleanisNullOrEmpty(String str) Method that checks whether a string is null or empty.static booleanisNullOrEmptyTrim(String str) Method that checks whether a string is null or empty after to apply the methodString.trim()on.
-
Field Details
-
EMPTY_STRING
Constant attribute that represents the string to identify the empty string.- See Also:
-
SPECIAL_BLANK_SPACE
public static final char SPECIAL_BLANK_SPACEConstant attribute that represents the string to identify the blank space character.- See Also:
-
SPECIAL_LINE_BREAK
public static final char SPECIAL_LINE_BREAKConstant attribute that represents the string to identify the line break character.- See Also:
-
SPECIAL_LINE_START
public static final char SPECIAL_LINE_STARTConstant attribute that represents the string to identify the line start character.- See Also:
-
SPECIAL_TABULATION
public static final char SPECIAL_TABULATIONConstant attribute that represents the string to identify the tabulation character.- See Also:
-
SYMBOL_PAD
public static final char SYMBOL_PADConstant attribute that represents the string to identify the symbol:#.- See Also:
-
SYMBOL_COLON
public static final char SYMBOL_COLONConstant attribute that represents the string to identify the symbol::.- See Also:
-
SYMBOL_SEMICOLON
public static final char SYMBOL_SEMICOLONConstant attribute that represents the string to identify the symbol:;.- See Also:
-
SYMBOL_EQUAL
public static final char SYMBOL_EQUALConstant attribute that represents the string to identify the symbol:=.- See Also:
-
CHARACTERS_SET
public static final char[] CHARACTERS_SETConstant attribute that represents the array with all the characters defined as constants in this class.
-
-
Method Details
-
isNullOrEmpty
Method that checks whether a string is null or empty.- Parameters:
str- Parameter that represents the string to process.- Returns:
- a boolean with
truevalue whether the string is null or empty, orfalsevalue in another case.
-
isNullOrEmptyTrim
Method that checks whether a string is null or empty after to apply the methodString.trim()on.- Parameters:
str- Parameter that represents the string to process.- Returns:
- a boolean with
truevalue whether the string is null or empty, orfalsevalue in another case.
-
containsSomeOfTheCharacterSet
Method that checks whether a string contains some of the characters contained inCHARACTERS_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
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).
-