[Htmlparser-cvs] htmlparser/src/org/htmlparser/nodes TextNode.java,1.4,1.5
Brought to you by:
derrickoswald
From: Ian M. <ian...@us...> - 2005-11-04 15:50:00
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27141/src/org/htmlparser/nodes Modified Files: TextNode.java Log Message: Add method isWhiteSpace to TextNode that returns if the node is nothing but white space (or null) or if it contains some characters. Index: TextNode.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/nodes/TextNode.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TextNode.java 10 Apr 2005 23:20:44 -0000 1.4 --- TextNode.java 4 Nov 2005 15:49:45 -0000 1.5 *************** *** 211,214 **** --- 211,225 ---- /** + * Returns if the node consists of only white space. + * White space can be spaces, new lines, etc. + */ + public boolean isWhiteSpace() + { + if (mText == null || mText.trim().equals("")) + return true; + return false; + } + + /** * String visiting code. * @param visitor The <code>NodeVisitor</code> object to invoke |