/** * Return the contents of this link node as a string suitable for debugging. * @return A string representation of this node. */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Link to : "+ getLink() + "; titled : "+getLinkText ()+"; begins at : "+getStartPosition ()+"; ends at : "+getEndPosition ()+ ", AccessKey="); if (getAccessKey ()==null) sb.append("null\n"); else sb.append(getAccessKey ()+"\n"); if (null != getChildren ()) { Node node; int i = 0; for (SimpleNodeIterator e=children();e.hasMoreNodes();) { node = e.nextNode(); sb.append(" "+(i++)+ " "); sb.append(node.toString()+"\n"); } } return sb.toString(); }
/** * Return the contents of this link node as a string suitable for debugging. * @return A string representation of this node. */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Link to : "+ getLink() + "; titled : "+getLinkText ()+"; begins at : "+getStartPosition ()+"; ends at : "+getEndPosition ()+ ", AccessKey="); if (getAccessKey ()==null) sb.append("null\n"); else sb.append(getAccessKey ()+"\n"); if (null != getChildren ()) { sb.append(" "+"LinkData\n"); sb.append(" "+"--------\n"); Node node; int i = 0; for (SimpleNodeIterator e=children();e.hasMoreNodes();) { node = e.nextNode(); sb.append(" "+(i++)+ " "); sb.append(node.toString()+"\n"); } } sb.append(" "+"*** END of LinkData ***\n"); return sb.toString(); }