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>waitingTagsprivate booleanwaitingTagsUsed
-
Constructor Summary
Constructors Constructor Description TagTreeIteratorFlusher()Creates a new instance ofTagTreeIteratorFlusher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(IStructureNode node)Checks whether the element should be traversed.voidprocessElement(IStructureNode elem)Called when the next element is reached during the traversal to process it.ITagTreeIteratorHandlersetWaitingTags(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
TagTreeIteratorFlusherinstance
-
accept
public boolean accept(IStructureNode node)
Description copied from interface:ITagTreeIteratorHandlerChecks whether the element should be traversed.- Specified by:
acceptin interfaceITagTreeIteratorHandler- Overrides:
acceptin classAbstractAvoidDuplicatesTagTreeIteratorHandler- Parameters:
node- the element to check- Returns:
trueif the iteration should be continued,falseotherwise
-
processElement
public void processElement(IStructureNode elem)
Description copied from interface:ITagTreeIteratorHandlerCalled when the next element is reached during the traversal to process it.- Parameters:
elem- the element to process
-
-