集合排序、map、枚举

private void sortList(List<AssessmentQuestionnaireRecord> list){
        Collections.sort(list, new Comparator<AssessmentQuestionnaireRecord>(){
            @Override
            public int compare(AssessmentQuestionnaireRecord record1, AssessmentQuestionnaireRecord record2) {
                return record1.getRiskOption().compareTo(record2.getRiskOption());
            }
            
        });
    }
private static Map<String,String> mapper = new HashMap<String,String>();
    static {
        mapper.put("0", "N");
        mapper.put("1", "Y");
    }
public enum CoreCifType {
    /**个人*/
    P,
    /**机构或企业*/
    E,
    /**同业*/
    SE

}

 

posted on 2019-01-10 10:28  小破孩楼主  阅读(253)  评论(0编辑  收藏  举报