Code example for CaseFormat

Methods: to

0
 
public enum BackupType { 
   DAILY, WEEKLY;
 
   public String value() {
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_HYPHEN, name());
   } 
 
   @Override 
   public String toString() {
      return value(); 
   } 
 
   public static BackupType fromValue(String backupType) {
      return valueOf(CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(backupType, "backupType")));
   } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE