com.jgaap.canonicizers
Class NormalizeWhitespace

java.lang.Object
  extended by com.jgaap.generics.Parameterizable
      extended by com.jgaap.generics.Canonicizer
          extended by com.jgaap.canonicizers.NormalizeWhitespace

public class NormalizeWhitespace
extends Canonicizer

Changes length of all white spaces to 1. Any sequence of whitespaces including newline, tab, and space, will become a single space in the processed document.

Since:
1.0

Constructor Summary
NormalizeWhitespace()
           
 
Method Summary
 java.lang.String displayName()
          Simple method to return the display name of this Canonicizer, to be used in the GUI.
 java.awt.Color guiColor()
          The color that should be used to represent this object in the GUI.
 java.util.Vector<java.lang.Character> process(java.util.Vector<java.lang.Character> procText)
          normalize whitespace in argument
 boolean showInGUI()
          Simple method to indicate whether this Canonicizer should be displayed in the GUI.
 java.lang.String tooltipText()
          Simple method to return the tooltip text of this Canonicizer, to be used in the GUI.
 
Methods inherited from class com.jgaap.generics.Canonicizer
equals, getExtraInfo, selftest, toString
 
Methods inherited from class com.jgaap.generics.Parameterizable
clearParameterSet, deleteParameter, getParameter, setParameter, setParameter, setParameter, setParameter
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NormalizeWhitespace

public NormalizeWhitespace()
Method Detail

displayName

public java.lang.String displayName()
Description copied from class: Canonicizer
Simple method to return the display name of this Canonicizer, to be used in the GUI.

Specified by:
displayName in class Canonicizer
Returns:
The human-readable name of this Canonicizer

tooltipText

public java.lang.String tooltipText()
Description copied from class: Canonicizer
Simple method to return the tooltip text of this Canonicizer, to be used in the GUI.

Specified by:
tooltipText in class Canonicizer
Returns:
The human-readable tooltip text to display when this Canonicizer is moused over

showInGUI

public boolean showInGUI()
Description copied from class: Canonicizer
Simple method to indicate whether this Canonicizer should be displayed in the GUI.

Specified by:
showInGUI in class Canonicizer
Returns:
Boolean flag indicating whether this Canonicizer should appear in the GUI

guiColor

public java.awt.Color guiColor()
Description copied from class: Canonicizer
The color that should be used to represent this object in the GUI.

Specified by:
guiColor in class Canonicizer
Returns:
Color that will be used to represent this Canonicizer.

process

public java.util.Vector<java.lang.Character> process(java.util.Vector<java.lang.Character> procText)
normalize whitespace in argument

Specified by:
process in class Canonicizer
Parameters:
procText - Vector of Characters to be processed
Returns:
Vector of Characters after converting tab, newline, etc. to single space.