package policy.price; public enum PolicyLevel { Standard(0), Agreement(1), Record(2); private String source; private int level; public static PolicyLevel parse(String source) { if ("协议分解".equalsIgnoreCase(source)) { return Agreement; } else if ("手动录入".equalsIgnoreCase(source)) { return Record; } return Standard; } public int getLevel() { return (this.level * 10); } private PolicyLevel(int level) { this.level = level; } public String getSource() { return source; } }