1 18 19 package org.apache.batik.dom.util; 20 21 import java.util.List ; 22 23 import org.w3c.dom.NodeList ; 24 import org.w3c.dom.Node ; 25 26 33 public class ListNodeList implements NodeList { 34 protected List list; 35 36 public ListNodeList(List list) { 37 this.list = list; 38 } 39 40 43 public Node item(int index) { 44 if ((index < 0) || (index > list.size())) 45 return null; 46 return (Node )list.get(index); 47 } 48 49 52 public int getLength() { 53 return list.size(); 54 } 55 }; 56 | Popular Tags |