1 16 package com.google.gwt.xml.client.impl; 17 18 import com.google.gwt.core.client.JavaScriptObject; 19 import com.google.gwt.xml.client.Node; 20 import com.google.gwt.xml.client.NodeList; 21 22 26 class NodeListImpl extends DOMItem implements NodeList { 27 28 protected NodeListImpl(JavaScriptObject o) { 29 super(o); 30 } 31 32 public int getLength() { 33 return XMLParserImpl.getLength(this.getJsObject()); 34 } 35 36 43 public Node item(int index) { 44 return NodeImpl.build(XMLParserImpl.item(this.getJsObject(), index)); 45 } 46 47 public String toString() { 48 StringBuffer b = new StringBuffer (); 49 for (int i = 0; i < getLength(); i++) { 50 b.append(item(i).toString()); 51 } 52 return b.toString(); 53 } 54 } 55 | Popular Tags |