com.nwoods.jgo.svg
Class DefaultList

java.lang.Object
  extended bycom.nwoods.jgo.svg.DefaultList
All Implemented Interfaces:
DomList

public class DefaultList
extends java.lang.Object
implements DomList

A wrapper class for org.w3c.dom.NodeList. By implementing the interface DomList, this class allows the com.nwoods.jgo package to provide methods that manipulate org.w3c.dom.NodeList objects while not requiring the org.w3c.dom.NodeList class to be present in order to build com.nwoods.jgo. JGo applications that support serialization to and from SVG XML files require this class.


Constructor Summary
DefaultList(org.w3c.dom.NodeList nodeList)
          Create a new DefaultList
 
Method Summary
 int getLength()
          The number of nodes in the list.
 org.w3c.dom.NodeList getNodeList()
          Return the org.w3c.dom.NodeList associated with this DefaultList
 DomNode item(int index)
          Returns the indexth item in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultList

public DefaultList(org.w3c.dom.NodeList nodeList)
Create a new DefaultList

Parameters:
nodeList - a org.w3c.dom.NodeList object
Method Detail

getNodeList

public org.w3c.dom.NodeList getNodeList()
Return the org.w3c.dom.NodeList associated with this DefaultList

Returns:
the the org.w3c.dom.NodeList associated with this DefaultList

getLength

public int getLength()
Description copied from interface: DomList
The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive

Specified by:
getLength in interface DomList
Returns:
the number of nodes in the list.

item

public DomNode item(int index)
Description copied from interface: DomList
Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.

Specified by:
item in interface DomList
Returns:
the indexth item in the collection.