Class Text

All Implemented Interfaces:
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 Details

    • encodedText

      protected String encodedText
    • blank

      protected Boolean blank
  • Constructor Details

  • Method Details

    • 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(String value)
      Sets the plain text as node value.
      Overrides:
      setNodeValue in class Node
    • setTextValue

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

      public 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