Class ChildBreaks

java.lang.Object
org.htmlcleaner.ChildBreaks

class ChildBreaks extends Object
Contains information about nodes that were closed due to their child nodes. i.e. if 'p' tag was closed due to 'table' child tag.
  • Field Details

  • Constructor Details

    • ChildBreaks

      ChildBreaks()
  • Method Details

    • addBreak

      public void addBreak(TagPos closedPos, TagPos breakPos)
      Adds the break info to the top of the stacks.
      Parameters:
      closedPos - - position of the tag that was closed due to incorrect child
      breakPos - - position of the child that has broken its parent
    • isEmpty

      public boolean isEmpty()
    • getLastBreakingTag

      public String getLastBreakingTag()
      Returns:
      name of the last children tag that has broken its parent.
    • pop

      public TagPos pop()
      pops out latest broken tag position.
      Returns:
      tag pos of the last parent that was broken.
    • getLastBreakingTagPosition

      public int getLastBreakingTagPosition()
      Returns:
      position of the last tag that has broken its parent. -1 if no such tag found.