1 19 20 package org.netbeans.modules.xml.spi.dom; 21 22 import java.util.List ; 23 24 import org.w3c.dom.*; 25 26 31 public final class NodeListImpl implements NodeList { 32 33 public static final NodeList EMPTY = new NodeList() { 34 public int getLength() { return 0; } 35 public org.w3c.dom.Node item(int i) { return null; } 36 public String toString() { return "NodeListImpl.EMPTY"; } 37 }; 38 39 private final List peer; 40 41 43 public NodeListImpl(List l) { 44 peer = l; 45 } 46 47 public int getLength() { 48 return peer.size(); 49 } 50 51 public org.w3c.dom.Node item(int i) { 52 return (Node) peer.get(i); 53 } 54 55 public String toString() { 56 return peer.toString(); 57 } 58 } 59 | Popular Tags |