Code example for CaseFormat

Methods: to

0
 
   public enum Type { 
      ONE_TIME, PERSISTENT, UNRECOGNIZED; 
 
      public String value() { 
         return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_HYPHEN, name()); 
      } 
 
      @Override 
      public String toString() { 
         return value(); 
      } 
 
      public static Type fromValue(String type) { 
         try { 
            return valueOf(CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type"))); 
         } catch (IllegalArgumentException e) { 
            return UNRECOGNIZED; 
         } 
      } 
Stop searching for code, let great code find you!  Add Codota to your java IDE