CS 1705 Library

net.sf.webcat
Enum StringNormalizer.StandardRule

java.lang.Object
  extended by java.lang.Enum<StringNormalizer.StandardRule>
      extended by net.sf.webcat.StringNormalizer.StandardRule
All Implemented Interfaces:
Serializable, Comparable<StringNormalizer.StandardRule>
Enclosing class:
StringNormalizer

public static enum StringNormalizer.StandardRule
extends Enum<StringNormalizer.StandardRule>

This enumeration defines the set of predefined transformation rules.


Enum Constant Summary
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_PUNCTUATION
          Strips all punctuation characters (that is, characters that are not letters, numbers, connecting punctuation like "_", or white space).
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_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.
OPT_IGNORE_BLANK_LINES
          Removes any blank lines.
 
Method Summary
static StringNormalizer.StandardRule valueOf(String name)
          Returns the enum constant of this type with the specified name.
static StringNormalizer.StandardRule[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IGNORE_PUNCTUATION

public static final StringNormalizer.StandardRule IGNORE_PUNCTUATION
Strips all punctuation characters (that is, characters that are not letters, numbers, connecting punctuation like "_", or white space).


IGNORE_CAPITALIZATION

public static final StringNormalizer.StandardRule IGNORE_CAPITALIZATION
Converts to all lower case.


IGNORE_NEWLINE_DIFFERENCES

public static final StringNormalizer.StandardRule 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

public static final StringNormalizer.StandardRule 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

public static final StringNormalizer.StandardRule IGNORE_TRAILING_NEWLINES
Trims any sequence of trailing line termination sequences (regardless of OS).


OPT_IGNORE_BLANK_LINES

public static final StringNormalizer.StandardRule OPT_IGNORE_BLANK_LINES
Removes any blank lines.


OPT_IGNORE_ALL_WHITESPACE

public static final StringNormalizer.StandardRule OPT_IGNORE_ALL_WHITESPACE
Removes all white space except line termination sequences (from any OS).


OPT_IGNORE_ALL_WHITESPACE_AND_NEWLINES

public static final StringNormalizer.StandardRule OPT_IGNORE_ALL_WHITESPACE_AND_NEWLINES
Removes all white space of any kind, including newlines of any kind.

Method Detail

values

public static final StringNormalizer.StandardRule[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(StringNormalizer.StandardRule c : StringNormalizer.StandardRule.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static StringNormalizer.StandardRule valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.