Class Text

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Text
    extends Node
    Text node. Text value is stored as node value in decoded, readable form. There is also an option to get and set html content in raw, html form.
    • Field Detail

      • encodedText

        protected java.lang.String encodedText
      • blank

        protected java.lang.Boolean blank
    • Constructor Detail

      • Text

        public Text​(Document ownerDocument,
                    java.lang.String text)
    • Method Detail

      • clone

        public Text clone()
        Specified by:
        clone in class Node
      • isBlank

        public boolean isBlank()
        Returns true if text content is blank.
      • setNodeValue

        public void setNodeValue​(java.lang.String value)
        Sets the plain text as node value.
        Overrides:
        setNodeValue in class Node
      • setTextValue

        public void setTextValue​(java.lang.String text)
        Sets HTML text, but decodes it first.
      • getTextValue

        public java.lang.String getTextValue()
        Returns encoded HTML text.
      • visitNode

        protected void visitNode​(NodeVisitor nodeVisitor)
        Description copied from class: Node
        Visits single node. Implementations just needs to call the correct visitor callback function.
        Specified by:
        visitNode in class Node