Adsense

Java hashmap example



import java.awt.AWTException;

import org.apache.commons.collections.map.HashedMap;



public class myclass {

static HashedMap hm = new HashedMap();

public static final String timeXpath = ".//*[@id='tableID']/div[1]/div/div[2]/table/tbody/tr/td//div[text()='Time']";
public static final String severityXpath = ".//*[@id='tableID']/div[1]/div/div[2]/table/tbody/tr/td//div[text()='Severity']";

public static void init() {
hm.put("timeXpath", new String(
timeXpath));
hm.put("severityXpath", new String(
severityXpath));

}

static String SortingColumnList[][] = {
{ "Time", "1", "timeXpath",
"sortable-ascending" },
{ "Severity", "2", "severityXpath",
"sortable-ascending" } };


public static void main(String[] args) throws AWTException {

init();
for(String[] items :SortingColumnList)
System.out.println(hm.get(items[2]));
}

}

No comments:

Post a Comment

comment here

newest questions on wordpress