public class MarkupFragment extends AbstractMarkupFragment
open-body-close: <span>body</span> open-close: <span/> open-no-close: <input ...>body
Markup
,
MarkupElement
Constructor and Description |
---|
MarkupFragment(IMarkupFragment markup,
int startIndex)
Construct.
|
Modifier and Type | Method and Description |
---|---|
IMarkupFragment |
find(String id)
Finds a markup fragment that spans a tag
|
MarkupElement |
get(int index)
Get the MarkupElement at the index provided.
|
MarkupResourceStream |
getMarkupResourceStream()
Get the underlying markup resource stream, which might contain more than just the markup
portion represented by the IMarkupFragment.
|
Markup |
getRootMarkup() |
Iterator<MarkupElement> |
iterator() |
int |
size()
The number of markup elements.
|
String |
toString(boolean markupOnly) |
find, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public MarkupFragment(IMarkupFragment markup, int startIndex)
markup
- The parent markup. May not be null.startIndex
- The start index of the child markupIndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size())public final MarkupElement get(int index)
IMarkupFragment
index
- Index into markup listpublic final IMarkupFragment find(String id)
IMarkupFragment
public final MarkupResourceStream getMarkupResourceStream()
IMarkupFragment
public final int size()
IMarkupFragment
public final Markup getRootMarkup()
public String toString(boolean markupOnly)
markupOnly
- True if only the markup shall be returnedpublic Iterator<MarkupElement> iterator()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.