com.myarch.treeiterator
Class DOMAdapter

java.lang.Object
  |
  +--com.myarch.treeiterator.DOMAdapter
All Implemented Interfaces:
TreeNodeAdapter

public class DOMAdapter
extends java.lang.Object
implements TreeNodeAdapter

This adapter maps org.w3c.dom.Node interface to the generic methods of the TreeIteratorAdapter. java.util.Iterator interface implementation is provided by the ChildrenAdapter nested class since it is not directly supported by org.w3c.dom.Node.


Inner Class Summary
static class DOMAdapter.ChildrenAdapter
          Implements java.util.Iterator methods for the node list.
 
Constructor Summary
DOMAdapter()
           
 
Method Summary
 java.util.Iterator getChildren(java.lang.Object node)
          Returns java.util.Iterator to iterate over children of the node.
 boolean hasChildren(java.lang.Object node)
          Returns true if the node has children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMAdapter

public DOMAdapter()
Method Detail

getChildren

public java.util.Iterator getChildren(java.lang.Object node)
Returns java.util.Iterator to iterate over children of the node.
Specified by:
getChildren in interface TreeNodeAdapter
Parameters:
node - node
Returns:
java.util.Iterator for the list of children.

hasChildren

public boolean hasChildren(java.lang.Object node)
Returns true if the node has children.
Specified by:
hasChildren in interface TreeNodeAdapter
Parameters:
node - node
Returns:
true if the node has children


Copyright © 2001 Alexander Ananiev & MyArch.com. All Rights Reserved.