package com.qmth.file.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 监考端资源包
 * @author tianjun
 *
 */
public enum ExamClientTheme {

	WHYYXY("武汉音乐学院", 0), SCYYXY("四川音乐学院", 1);

    private String name;

    private int id;

    private ExamClientTheme(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }
    
    public static List<Map<String, String>> toList() {
    	List<Map<String, String>> list = new ArrayList<Map<String, String>>();
    	  for (ExamClientTheme theme : ExamClientTheme.values()) {
    		  Map<String, String> map = new HashMap<String, String>();
    		  map.put(theme.name(), theme.getName());
          }
		return list;
    }

    public static ExamClientTheme findById(int id) {
        for (ExamClientTheme status : ExamClientTheme.values()) {
            if (status.id == id) {
                return status;
            }
        }
        return null;
    }

}
