1 16 17 package org.apache.xerces.dom; 18 19 import java.util.Vector ; 20 21 import org.w3c.dom.DOMStringList ; 22 23 32 public class DOMStringListImpl implements DOMStringList { 33 34 private Vector fStrings; 36 37 40 public DOMStringListImpl() { 41 fStrings = new Vector (); 42 } 43 44 47 public DOMStringListImpl(Vector params) { 48 fStrings = params; 49 } 50 51 54 public String item(int index) { 55 try { 56 return (String ) fStrings.elementAt(index); 57 } catch (ArrayIndexOutOfBoundsException e) { 58 return null; 59 } 60 } 61 62 65 public int getLength() { 66 return fStrings.size(); 67 } 68 69 72 public boolean contains(String param) { 73 return fStrings.contains(param) ; 74 } 75 76 82 public void add(String param) { 83 fStrings.add(param); 84 } 85 86 } 87 | Popular Tags |