FileDocCategorySizeDatePackage
LeafNodeImpl.javaAPI DocAndroid 1.5 API1986Wed May 06 22:41:06 BST 2009org.apache.harmony.xml.dom

LeafNodeImpl

public abstract class LeafNodeImpl extends NodeImpl
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

This class represents a Node that has a parent Node, but no children.

Fields Summary
InnerNodeImpl
parent
int
index
Constructors Summary
LeafNodeImpl(DocumentImpl document)

        super(document);
    
Methods Summary
public org.w3c.dom.NodegetNextSibling()

        if (parent == null || index + 1 >= parent.children.size()) {
            return null;
        }

        return parent.children.get(index + 1);
    
public org.w3c.dom.NodegetParentNode()

        return parent;
    
public org.w3c.dom.NodegetPreviousSibling()

        if (parent == null || index == 0) {
            return null;
        }

        return parent.children.get(index - 1);
    
booleanisParentOf(org.w3c.dom.Node node)

        return false;