KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > xslt > CollectionNodeList


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.webwork.views.xslt;
6
7 import org.w3c.dom.Node JavaDoc;
8 import org.w3c.dom.NodeList JavaDoc;
9
10 import java.util.List JavaDoc;
11
12
13 /**
14  * @author <a HREF="mailto:meier@meisterbohne.de">Philipp Meier</a>
15  * Date: 10.10.2003
16  * Time: 20:40:44
17  */

18 public class CollectionNodeList implements NodeList JavaDoc {
19     //~ Instance fields ////////////////////////////////////////////////////////
20

21     private List JavaDoc nodes;
22
23     //~ Constructors ///////////////////////////////////////////////////////////
24

25     public CollectionNodeList(List JavaDoc nodes) {
26         this.nodes = nodes;
27     }
28
29     //~ Methods ////////////////////////////////////////////////////////////////
30

31     public int getLength() {
32         return nodes.size();
33     }
34
35     public Node JavaDoc item(int i) {
36         return (Node JavaDoc) nodes.get(i);
37     }
38 }
39
Popular Tags