org.enhydra.xml.xmlc.dom.generic
Class ContainedNodeEnum

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.generic.ContainedNodeEnum
All Implemented Interfaces:
java.util.Enumeration

public class ContainedNodeEnum
extends java.lang.Object
implements java.util.Enumeration

Enumeration over the nodes contained by another node. This provides a way of find traversing standard children, attributes and document type entity and notation nodes in the same way.


Field Summary
static int ALL
           
static int ATTRIBUTES
           
static int CHILDREN
           
static int ENTITIES
           
static int NONE
          Types of contained nodes to enumerate.
static int NOTATIONS
           
 
Constructor Summary
ContainedNodeEnum(org.w3c.dom.Node parent)
          Constructor for enumerating all nodes types
ContainedNodeEnum(org.w3c.dom.Node parent, int filterSet)
          Constructor with filter for node types
 
Method Summary
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration
 org.w3c.dom.Node nextNode()
          Returns the next node of this enumeration, or null if no more.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Types of contained nodes to enumerate. This is both a bit set and values that define the order contained nodes are traversed.

See Also:
Constant Field Values

CHILDREN

public static final int CHILDREN
See Also:
Constant Field Values

ATTRIBUTES

public static final int ATTRIBUTES
See Also:
Constant Field Values

ENTITIES

public static final int ENTITIES
See Also:
Constant Field Values

NOTATIONS

public static final int NOTATIONS
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values
Constructor Detail

ContainedNodeEnum

public ContainedNodeEnum(org.w3c.dom.Node parent,
                         int filterSet)
Constructor with filter for node types


ContainedNodeEnum

public ContainedNodeEnum(org.w3c.dom.Node parent)
Constructor for enumerating all nodes types

Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this enumeration contains more elements.

Specified by:
hasMoreElements in interface java.util.Enumeration

nextNode

public org.w3c.dom.Node nextNode()
                          throws java.util.NoSuchElementException
Returns the next node of this enumeration, or null if no more.

java.util.NoSuchElementException

nextElement

public java.lang.Object nextElement()
                             throws java.util.NoSuchElementException
Returns the next element of this enumeration

Specified by:
nextElement in interface java.util.Enumeration
java.util.NoSuchElementException


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.