@GwtCompatible public enum CaseFormat extends Enum<CaseFormat>
| Enum Constant and Description | 
|---|
| LOWER_CAMELJava variable naming convention, e.g., "lowerCamel". | 
| LOWER_HYPHENHyphenated variable naming convention, e.g., "lower-hyphen". | 
| LOWER_UNDERSCOREC++ variable naming convention, e.g., "lower_underscore". | 
| UPPER_CAMELJava and C++ class naming convention, e.g., "UpperCamel". | 
| UPPER_UNDERSCOREJava and C++ constant naming convention, e.g., "UPPER_UNDERSCORE". | 
| Modifier and Type | Method and Description | 
|---|---|
| Converter<String,String> | converterTo(CaseFormat targetFormat)Returns a  Converterthat converts strings from this format totargetFormat. | 
| String | to(CaseFormat format,
  String str)Converts the specified  String strfrom this format to the specifiedformat. | 
| static CaseFormat | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static CaseFormat[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final CaseFormat LOWER_HYPHEN
public static final CaseFormat LOWER_UNDERSCORE
public static final CaseFormat LOWER_CAMEL
public static final CaseFormat UPPER_CAMEL
public static final CaseFormat UPPER_UNDERSCORE
public static CaseFormat[] values()
for (CaseFormat c : CaseFormat.values()) System.out.println(c);
public static CaseFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final String to(CaseFormat format, String str)
String str from this format to the specified format. A
 "best effort" approach is taken; if str does not conform to the assumed format, then
 the behavior of this method is undefined but we make a reasonable effort at converting anyway.public Converter<String,String> converterTo(CaseFormat targetFormat)
Converter that converts strings from this format to targetFormat.Copyright © 2010-2017. All Rights Reserved.