Package org.apache.wicket.markup
Class MarkupIterator
- java.lang.Object
-
- org.apache.wicket.markup.MarkupIterator
-
- All Implemented Interfaces:
Iterator<MarkupElement>
public class MarkupIterator extends Object implements Iterator<MarkupElement>
- Author:
- Juergen Donnerstag
-
-
Constructor Summary
Constructors Constructor Description MarkupIterator(IMarkupFragment markup)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
MarkupElement
next()
ComponentTag
nextTag()
WicketTag
nextWicketTag()
void
remove()
void
setComponentTagOnly(boolean componentTagOnly)
Ignore raw markup and iterate over component and wicket tags only.void
setOpenTagOnly(boolean openTagOnly)
Ignore close tag.void
setWicketTagOnly(boolean wicketTagOnly)
Ignore raw markup and component tags, and iterate over WicketTags only-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
MarkupIterator
public MarkupIterator(IMarkupFragment markup)
Construct.- Parameters:
markup
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<MarkupElement>
- See Also:
Iterator.hasNext()
-
next
public MarkupElement next()
- Specified by:
next
in interfaceIterator<MarkupElement>
- See Also:
Iterator.next()
-
nextTag
public ComponentTag nextTag()
- Returns:
- The next element assuming it is a ComponentTag or WicketTag
-
nextWicketTag
public WicketTag nextWicketTag()
- Returns:
- The next element assuming it is a WicketTag
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<MarkupElement>
- See Also:
Iterator.remove()
-
setComponentTagOnly
public final void setComponentTagOnly(boolean componentTagOnly)
Ignore raw markup and iterate over component and wicket tags only.- Parameters:
componentTagOnly
-
-
setWicketTagOnly
public final void setWicketTagOnly(boolean wicketTagOnly)
Ignore raw markup and component tags, and iterate over WicketTags only- Parameters:
wicketTagOnly
-
-
setOpenTagOnly
public final void setOpenTagOnly(boolean openTagOnly)
Ignore close tag. Iterate over open and open-close tags only- Parameters:
openTagOnly
-
-
-