TMTimerUtil { public static Map<String,int[]> parseProps(Properties p) { Map<String,int[]> h = new HashMap<String,int[]>(); Enumeration<Object> it = p.keys(); while (it.hasMoreElements()) { String key = (String)it.nextElement(); String val = (String)p.getProperty(key); int[] data = new int[3]; StringTokenizer st = new StringTokenizer(val); int ix = 0; while (st.hasMoreElements()) { String t = (String)st.nextElement(); data[ix++] = mmssToInt(t); } h.put(key, data); } return h; }  static Map<String,int[]> parseProps(Properties p); static int mmssToInt(String t); static String intToMmss(int ns); static void loadProperties(Properties p, String progname);  }
@Test public void testParseProps() { Map<String,int[]> ret = TMTimerUtil.parseProps(p); int[] one = ret.get("30,45,60"); assertEquals(3, one.length); assertEquals(30, one[0]); assertEquals(45, one[1]); assertEquals(60, one[2]); }