|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.xom.Node
nu.xom.LeafNode
This class represents the leaf nodes in an XML document; i.e. those tree nodes that cannot have children:
Text
Comment
ProcessingInstruction
DocType
Method Summary | |
Node |
getChild(int position)
Throws IndexOutOfBoundsException because
leaf nodes do not have children. |
int |
getChildCount()
Returns 0 because leaf nodes do not have children. |
boolean |
hasChildren()
Returns false because leaf nodes do not have children. |
Methods inherited from class nu.xom.Node |
checkDetach, copy, detach, equals, getBaseURI, getDocument, getParent, getValue, hashCode, toString, toXML |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public final boolean hasChildren()
Returns false because leaf nodes do not have children.
hasChildren
in class Node
ParentNode.hasChildren()
public final Node getChild(int position)
Throws IndexOutOfBoundsException
because
leaf nodes do not have children.
getChild
in class Node
position
- the index of the child node to return
java.lang.IndexOutOfBoundsException
- because leaf nodes
do not have childrenpublic final int getChildCount()
Returns 0 because leaf nodes do not have children.
getChildCount
in class Node
ParentNode.getChildCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |