1 22 package org.jboss.test.bench.servlet; 23 24 import java.util.ArrayList ; 25 import java.util.Hashtable ; 26 27 public class ConfigData { 28 ArrayList names = new ArrayList (); 29 Hashtable infos = new Hashtable (); 30 31 public ConfigData() { 32 setInfo("Hardware", ""); 33 setInfo("CPU", ""); 34 setInfo("RAM", ""); 35 setInfo("OS", ""); 36 setInfo("JDK Vendor/Version", ""); 37 setInfo("EJB Server", ""); 38 setInfo("Servlet Engine", ""); 39 setInfo("Web Server", ""); 40 setInfo("DB", ""); 41 } 42 43 public int size() { 44 return infos.size(); 45 } 46 47 public String getName(int i) { 48 return (String )names.get(i); 49 } 50 51 public String getValue(int i) { 52 return (String )infos.get(names.get(i)); 53 } 54 55 public void setInfo(String name, String value) { 56 if (!infos.containsKey(name)) names.add(name); 57 infos.put(name, value); 58 } 59 } 60 61 | Popular Tags |