Code example for CaseFormat

Methods: to

0
   public static enum Type { 
      PRIMARY, SECONDARY;
 
      @Override 
      public String toString() {
         return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name());
      } 
 
      public static Type fromValue(String type) {
         return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type")));
      } 
 
   } 
 
   public static enum SerialStyle { 
      /** 
       * Serials are incremented by 1 on every change 
       */ 
      INCREMENT,
      /** 
       * Serials will be the UNIX timestamp at the time of the publish