org.writersforge.catalan.text.filters
Class MultiLineCommentStripper

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

public class MultiLineCommentStripper
extends java.lang.Object
implements ITextFilter

Text filter which removes multi-line comments from the input text document.

Author:
jsheets

Constructor Summary
MultiLineCommentStripper(java.lang.String startToken, java.lang.String endToken)
          Creates a new instance of MultiLineCommentStripper.
 
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
 

Constructor Detail

MultiLineCommentStripper

public MultiLineCommentStripper(java.lang.String startToken,
                                java.lang.String endToken)
Creates a new instance of MultiLineCommentStripper.

Parameters:
startToken - beginning token of the comment
endToken - ending token of the comment
Method Detail

filterText

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

This implementation removes multiple-line comments, from each starting comment token it finds, until the end of the ending comment token.

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