Code example for CaseFormat

Methods: to

0
    * only inbound packets of this type pass through the firewall 
    */ 
   ALLOW_TRAFFIC_IN, UNRECOGNIZED;
 
   public String value() {
      return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name());
   } 
 
   @Override 
   public String toString() {
      return value(); 
   } 
 
   public static NatPolicy fromValue(String policy) {
      try { 
         return valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(policy, "policy")));
      } catch (IllegalArgumentException e) {
         return UNRECOGNIZED;
      } 
   }