Code example for CaseFormat

Methods: to

0
 */ 
public enum Payer { 
   REQUESTER, BUCKET_OWNER, UNRECOGNIZED;
 
   public String value() {
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
   } 
 
   public static Payer fromValue(String payer) {
      try { 
         return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, payer));
      } catch (IllegalArgumentException e) {
         return UNRECOGNIZED;
      } 
   } 
} 
Contextual code suggestions in your IDE  Get Codota for Java