public static class HTMLNode.Default extends java.lang.Object implements HTMLNode
HTMLNode.Default, HTMLNode.Empty
Constructor and Description |
---|
Default(java.lang.String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to the HTML node.
|
void |
addChild(HTMLElement child)
Add a child to the HTML node.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Return the attributes of the HTML node.
|
java.util.List<HTMLElement> |
getChildren()
Return the chidren elements, which can be children nodes or HTML character content.
|
java.lang.String |
getName()
Return the Node name.
|
boolean |
hasChildren()
Return true if the HTML node has children, which can be children nodes or HTML character content.
|
public Default(java.lang.String name)
name
- the Node namepublic java.lang.String getName()
public boolean hasChildren()
hasChildren
in interface HTMLNode
public void addChild(HTMLElement child)
public void addAttribute(java.lang.String name, java.lang.String value)
addAttribute
in interface HTMLNode
name
- the attribute namevalue
- the attribute valuepublic java.util.List<HTMLElement> getChildren()
getChildren
in interface HTMLNode
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttributes
in interface HTMLNode
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence