Code example for CaseFormat

Methods: to

0
 
public enum IpState { 
   UNASSIGNED, ASSIGNED, UNRECOGNIZED;
 
   public String toString() {
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
   } 
 
   public static IpState fromValue(String state) {
      try { 
         return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(state, "state")));
      } catch (IllegalArgumentException e) {
         return UNRECOGNIZED;
      } 
   } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE