org.writersforge.catalan.text.filters
Class SingleLineCommentStripper

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

public class SingleLineCommentStripper
extends java.lang.Object
implements ITextFilter

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

Author:
jsheets

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

SingleLineCommentStripper

public SingleLineCommentStripper(java.lang.String startToken)
Creates a new instance of SingleLineCommentStripper.

Parameters:
startToken - beginning 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 single-line comments, from each comment token it finds, until the end of the given line.

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