Class ChildBreaks


  • class ChildBreaks
    extends java.lang.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 Detail

      • closedByChildBreak

        java.util.Stack<TagPos> closedByChildBreak
      • breakingTags

        private java.util.Stack<TagPos> breakingTags
    • Constructor Detail

      • ChildBreaks

        ChildBreaks()
    • Method Detail

      • 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 java.lang.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.