package company.entry; public enum BoqNode { table,startLine,endLine; public static BoqNode getEnumFromString(String str) { if(str != null) { try { return Enum.valueOf(BoqNode.class, str); } catch (IllegalArgumentException e) { // TODO: handle exception e.printStackTrace(); } } return null; } }
原文地址:http://nonkey.blog.51cto.com/6923493/1877536