Code example for CaseFormat

Methods: to

0
 
public enum LeaseStatus { 
   LOCKED, UNLOCKED, UNRECOGNIZED;
 
   public String value() {
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
   } 
 
   @Override 
   public String toString() {
      return value(); 
   } 
 
   public static LeaseStatus fromValue(String type) {
      try { 
         return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type")));
      } catch (IllegalArgumentException e) {
         return UNRECOGNIZED;
      } 
   } 
Connect your IDE to all the code out there  Get Codota for Java