Package org.htmlcleaner
Class ChildBreaks
- java.lang.Object
-
- org.htmlcleaner.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 Summary
Fields Modifier and Type Field Description private java.util.Stack<TagPos>
breakingTags
(package private) java.util.Stack<TagPos>
closedByChildBreak
-
Constructor Summary
Constructors Constructor Description ChildBreaks()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBreak(TagPos closedPos, TagPos breakPos)
Adds the break info to the top of the stacks.java.lang.String
getLastBreakingTag()
int
getLastBreakingTagPosition()
boolean
isEmpty()
TagPos
pop()
pops out latest broken tag position.
-
-
-
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 childbreakPos
- - 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.
-
-