Package com.itextpdf.kernel.pdf.tagutils
Class TagTreeIteratorFlusher
- java.lang.Object
-
- com.itextpdf.kernel.pdf.tagutils.AbstractAvoidDuplicatesTagTreeIteratorHandler
-
- com.itextpdf.kernel.pdf.tagutils.TagTreeIteratorFlusher
-
- All Implemented Interfaces:
ITagTreeIteratorHandler
public class TagTreeIteratorFlusher extends AbstractAvoidDuplicatesTagTreeIteratorHandler
Class that flushes struct elements while iterating over struct tree root withTagTreeIterator
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<PdfDictionary>
waitingTags
private boolean
waitingTagsUsed
-
Constructor Summary
Constructors Constructor Description TagTreeIteratorFlusher()
Creates a new instance ofTagTreeIteratorFlusher
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(IStructureNode node)
Checks whether the element should be traversed.void
processElement(IStructureNode elem)
Called when the next element is reached during the traversal to process it.ITagTreeIteratorHandler
setWaitingTags(java.util.Set<PdfDictionary> waitingTags)
Sets waiting tags forTagTreeIteratorFlusher
.
-
-
-
Field Detail
-
waitingTags
private java.util.Set<PdfDictionary> waitingTags
-
waitingTagsUsed
private boolean waitingTagsUsed
-
-
Constructor Detail
-
TagTreeIteratorFlusher
public TagTreeIteratorFlusher()
Creates a new instance ofTagTreeIteratorFlusher
.
-
-
Method Detail
-
setWaitingTags
public ITagTreeIteratorHandler setWaitingTags(java.util.Set<PdfDictionary> waitingTags)
Sets waiting tags forTagTreeIteratorFlusher
.- Parameters:
waitingTags
- waiting tags to set- Returns:
- this same
TagTreeIteratorFlusher
instance
-
accept
public boolean accept(IStructureNode node)
Description copied from interface:ITagTreeIteratorHandler
Checks whether the element should be traversed.- Specified by:
accept
in interfaceITagTreeIteratorHandler
- Overrides:
accept
in classAbstractAvoidDuplicatesTagTreeIteratorHandler
- Parameters:
node
- the element to check- Returns:
true
if the iteration should be continued,false
otherwise
-
processElement
public void processElement(IStructureNode elem)
Description copied from interface:ITagTreeIteratorHandler
Called when the next element is reached during the traversal to process it.- Parameters:
elem
- the element to process
-
-