KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > gulden > util > xml > NodeListImpl


1 /*
2  * Project: Gulden Utilies
3  * Class: de.gulden.util.xml.NodeListImpl
4  * Version: snapshot-beautyj-1.1
5  *
6  * Date: 2004-09-29
7  *
8  * This is a snapshot version of the Gulden Utilities,
9  * it is not released as a seperate version.
10  *
11  * Note: Contains auto-generated Javadoc comments created by BeautyJ.
12  *
13  * This is licensed under the GNU Lesser General Public License (LGPL)
14  * and comes with NO WARRANTY.
15  *
16  * Author: Jens Gulden
17  * Email: amoda@jensgulden.de
18  */

19
20 package de.gulden.util.xml;
21
22 import java.io.*;
23 import java.util.*;
24 import javax.xml.parsers.*;
25 import org.w3c.dom.*;
26
27 /**
28  * Class NodeListImpl.
29  *
30  * @author Jens Gulden
31  * @version snapshot-beautyj-1.1
32  */

33 public class NodeListImpl extends ArrayList implements NodeListCollection {
34
35     // ------------------------------------------------------------------------
36
// --- constructor ---
37
// ------------------------------------------------------------------------
38

39     /**
40      * <p>
41      * Creates new NodeListImpl
42      * </p>
43      * </p>
44      */

45     public NodeListImpl() {
46         super();
47     }
48
49
50     // ------------------------------------------------------------------------
51
// --- methods ---
52
// ------------------------------------------------------------------------
53

54     /**
55      * Returns the list.
56      */

57     public Vector getList() {
58         return new Vector(this);
59     }
60
61     /**
62      * Sets the list.
63      * Not synchronized.
64      */

65     public void setList(Vector vector) {
66         clear();
67         addAll(vector);
68     }
69
70     public Node item(int index) {
71         return (Node)get(index);
72     }
73
74     /**
75      * Returns the length.
76      */

77     public int getLength() {
78         return size();
79     }
80
81 } // end NodeListImpl
82
Popular Tags