public class HtmlElementMixed extends HtmlElement
Constructor and Description |
---|
HtmlElementMixed() |
Modifier and Type | Method and Description |
---|---|
HtmlElement |
child(Object child)
Adds a child element to this element.
|
HtmlElement |
children(Object... children)
Adds one or more child elements to this element.
|
<T> T |
getChild(Class<T> type,
int index)
Returns the child node at the specified index.
|
Object |
getChild(int... index)
Returns the child node at the specified address.
|
Object |
getChild(int index)
Returns the child node at the specified index.
|
LinkedList<Object> |
getChildren()
The children of this element.
|
HtmlElement |
setChildren(LinkedList<Object> children)
Sets the children of this element.
|
_class, accesskey, attr, attrUri, contenteditable, dir, getAttr, getAttr, getAttrs, hidden, id, lang, onabort, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, oncuechange, ondblclick, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting, setAttrs, spellcheck, style, tabindex, title, toString, translate
public HtmlElementMixed()
@Xml(format=MIXED) @BeanProperty(beanDictionary=HtmlBeanDictionary.class, name="c") public LinkedList<Object> getChildren()
@BeanProperty(value="c") public HtmlElement setChildren(LinkedList<Object> children)
children
- The new children of this element.public Object getChild(int index)
index
- The index of the node in the list of children.public Object getChild(int... index)
Indexes are zero-indexed.
For example, calling getChild(1,2,3);
will return the 4th child of the 3rd child of the 2nd child.
index
- The child indexes.public <T> T getChild(Class<T> type, int index)
type
- The class type of the node.index
- The index of the node in the list of children.InvalidDataConversionException
- If node is not the expected type.public HtmlElement children(Object... children)
children
- The children to add as child elements.
Can be a mixture of strings and HtmlElement
objects.
Can also be containers of strings and elements.public HtmlElement child(Object child)
child
- The child to add as a child element.
Can be a string or HtmlElement
.
Can also be a container of strings and elements.Copyright © 2018 Apache. All rights reserved.