Code example for CaseFormat

Methods: to

0
      return value(); 
   } 
 
   public static AllocationModel fromValue(String model) {
      try { 
         return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(model, "model")));
      } catch (IllegalArgumentException e) {
         return UNRECOGNIZED;
      } 
   } 
} 
Contextual code suggestions in your IDE  Get Codota for Java