org.writersforge.catalan.text.filters
Class CaseFilter

java.lang.Object
  extended byorg.writersforge.catalan.text.filters.CaseFilter
All Implemented Interfaces:
ITextFilter

public class CaseFilter
extends java.lang.Object
implements ITextFilter

Text filter to alter the upper/lower capitalization style of a text document.

Author:
jsheets

Nested Class Summary
static class CaseFilter.CaseStyle
          Enumeration for upper/lower case capitalization styles.
 
Field Summary
static CaseFilter.CaseStyle LOWER
          Case style for all lower case.
static CaseFilter.CaseStyle SENTENCE
          Case style for capitalizing the first letter of every sentence.
static CaseFilter.CaseStyle TITLE
          Case style for capitalizing the first letter of every word.
static CaseFilter.CaseStyle UPPER
          Case style for all upper case.
 
Constructor Summary
CaseFilter(CaseFilter.CaseStyle style)
          Creates a new instance of CaseFilter.
 
Method Summary
 java.lang.String filterText(java.lang.String text)
          Sends input document through a modifying filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPPER

public static final CaseFilter.CaseStyle UPPER
Case style for all upper case.


LOWER

public static final CaseFilter.CaseStyle LOWER
Case style for all lower case.


TITLE

public static final CaseFilter.CaseStyle TITLE
Case style for capitalizing the first letter of every word.


SENTENCE

public static final CaseFilter.CaseStyle SENTENCE
Case style for capitalizing the first letter of every sentence.

Constructor Detail

CaseFilter

public CaseFilter(CaseFilter.CaseStyle style)
Creates a new instance of CaseFilter.

Parameters:
style - capitalization style
Method Detail

filterText

public java.lang.String filterText(java.lang.String text)
Sends input document through a modifying filter.

Specified by:
filterText in interface ITextFilter
Parameters:
text - input text document
Returns:
modified version of input document