Package student.testingsupport
Enum Class StringNormalizer.StandardRule
- All Implemented Interfaces:
Serializable
,Comparable<StringNormalizer.StandardRule>
,Constable
- Enclosing class:
- StringNormalizer
This enumeration defines the set of predefined transformation rules.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConverts to all lower case.Convert all MS-DOS (CRLF, "\r\n") and Mac (CR, "\r") line termination sequences to Unix-style (LF, "\n") termination sequences.Strips all punctuation characters (that is, characters that are not letters, numbers, connecting punctuation like "_", or white space).Same as IGNORE_NEWLINE_DIFFERENCES, but also converts all non-empty sequences of white space characters (except newlines) to single spaces, and trims any leading or trailing white space from every line.Trims any sequence of trailing line termination sequences (regardless of OS).Removes all white space except line termination sequences (from any OS).Removes all white space of any kind, including newlines of any kind.Removes any blank lines. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static StringNormalizer.StandardRule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IGNORE_PUNCTUATION
Strips all punctuation characters (that is, characters that are not letters, numbers, connecting punctuation like "_", or white space). -
IGNORE_CAPITALIZATION
Converts to all lower case. -
IGNORE_NEWLINE_DIFFERENCES
Convert all MS-DOS (CRLF, "\r\n") and Mac (CR, "\r") line termination sequences to Unix-style (LF, "\n") termination sequences. -
IGNORE_SPACING_DIFFERENCES
Same as IGNORE_NEWLINE_DIFFERENCES, but also converts all non-empty sequences of white space characters (except newlines) to single spaces, and trims any leading or trailing white space from every line. -
IGNORE_TRAILING_NEWLINES
Trims any sequence of trailing line termination sequences (regardless of OS). -
OPT_IGNORE_BLANK_LINES
Removes any blank lines. -
OPT_IGNORE_ALL_WHITESPACE
Removes all white space except line termination sequences (from any OS). -
OPT_IGNORE_ALL_WHITESPACE_AND_NEWLINES
Removes all white space of any kind, including newlines of any kind.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-