Map的迭代遍历

	public void save(Map<String, String> options) {
		Iterator<Entry<String, String>> ltr = options.entrySet().iterator();
		while(ltr.hasNext()) {
			Entry<String, String> entry= ltr.next();
			
			Options option = new Options();
			option.setOption_name(entry.getKey());
			option.setOption_value(entry.getValue());
			option.setAutoload(true);
			save(option);
		}
	}

 

你可能感兴趣的:(map)