de.dbsystems.simplescrape
Class HTMLComment

java.lang.Object
  extended by de.dbsystems.simplescrape.AbstractHTMLToken
      extended by de.dbsystems.simplescrape.HTMLComment

public class HTMLComment
extends AbstractHTMLToken

Class for holding HTML-comments. These are all texts surrounded by

Since:
04.04.2007
Author:
Ronald Bieber, DB Systems GmbH

Constructor Summary
HTMLComment(java.lang.String text)
          Constructor for a comment
 
Method Summary
 java.lang.String getComment()
          The content of this comment, without the surrounding markers.
 boolean match(AbstractHTMLToken other, ScrapeOptions options)
          Determines whether two tokens match.
 java.lang.String toString()
          Returns the HTML-representation of this comment, including the comment-markers.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLComment

public HTMLComment(java.lang.String text)
Constructor for a comment

Parameters:
text - The content of the comment, without the surrounding markers. Example: "This is a comment", not ""
Method Detail

match

public boolean match(AbstractHTMLToken other,
                     ScrapeOptions options)
Description copied from class: AbstractHTMLToken
Determines whether two tokens match.

Specified by:
match in class AbstractHTMLToken
Parameters:
other - The search-HtmlToken to be tested against.
options - A set of options. Relevant options are attributesStrict, trimText and ignoreCase.
Returns:
true: The two elements match, false: they don't (duh!)

getComment

public java.lang.String getComment()
The content of this comment, without the surrounding markers.

Returns:
The content of this comment.

toString

public java.lang.String toString()
Returns the HTML-representation of this comment, including the comment-markers.

Overrides:
toString in class java.lang.Object
Returns:
The comment as HTML.