Home | History | Annotate | Download | only in base
      1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2 <!--NewPage-->
      3 <HTML>
      4 <HEAD>
      5 <!-- Generated by javadoc (build 1.6.0-google-internal) on Mon Jan 04 20:47:56 PST 2010 -->
      6 <TITLE>
      7 CaseFormat (Guava Libraries 2010.01.04)
      8 </TITLE>
      9 
     10 <META NAME="date" CONTENT="2010-01-04">
     11 
     12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
     13 
     14 <SCRIPT type="text/javascript">
     15 function windowTitle()
     16 {
     17     if (location.href.indexOf('is-external=true') == -1) {
     18         parent.document.title="CaseFormat (Guava Libraries 2010.01.04)";
     19     }
     20 }
     21 </SCRIPT>
     22 <NOSCRIPT>
     23 </NOSCRIPT>
     24 
     25 </HEAD>
     26 
     27 <BODY BGCOLOR="white" onload="windowTitle();">
     28 <HR>
     29 
     30 
     31 <!-- ========= START OF TOP NAVBAR ======= -->
     32 <A NAME="navbar_top"><!-- --></A>
     33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
     34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
     35 <TR>
     36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
     37 <A NAME="navbar_top_firstrow"><!-- --></A>
     38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
     39   <TR ALIGN="center" VALIGN="top">
     40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
     41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
     42   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
     43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CaseFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
     44   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
     45   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
     46   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
     47   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
     48   </TR>
     49 </TABLE>
     50 </TD>
     51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
     52 </EM>
     53 </TD>
     54 </TR>
     55 
     56 <TR>
     57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     58 &nbsp;PREV CLASS&nbsp;
     59 &nbsp;<A HREF="../../../../com/google/common/base/CharMatcher.html" title="class in com.google.common.base"><B>NEXT CLASS</B></A></FONT></TD>
     60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     61   <A HREF="../../../../index.html?com/google/common/base/CaseFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     62 &nbsp;<A HREF="CaseFormat.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
     63 &nbsp;<SCRIPT type="text/javascript">
     64   <!--
     65   if(window==top) {
     66     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
     67   }
     68   //-->
     69 </SCRIPT>
     70 <NOSCRIPT>
     71   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
     72 </NOSCRIPT>
     73 
     74 
     75 </FONT></TD>
     76 </TR>
     77 <TR>
     78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     79   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
     80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     81 DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
     82 </TR>
     83 </TABLE>
     84 <A NAME="skip-navbar_top"></A>
     85 <!-- ========= END OF TOP NAVBAR ========= -->
     86 
     87 <HR>
     88 <!-- ======== START OF CLASS DATA ======== -->
     89 <H2>
     90 <FONT SIZE="-1">
     91 com.google.common.base</FONT>
     92 <BR>
     93 Enum CaseFormat</H2>
     94 <PRE>
     95 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
     96   <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</A>&lt;<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>&gt;
     97       <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.base.CaseFormat</B>
     98 </PRE>
     99 <DL>
    100 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A>&lt;<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>&gt;</DD>
    101 </DL>
    102 <HR>
    103 <DL>
    104 <DT><PRE>public enum <B>CaseFormat</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>&gt;</DL>
    105 </PRE>
    106 
    107 <P>
    108 Utility class for converting between various case formats.
    109 <P>
    110 
    111 <P>
    112 <DL>
    113 <DT><B>Since:</B></DT>
    114   <DD>2009.09.15 <b>tentative</b></DD>
    115 <DT><B>Author:</B></DT>
    116   <DD>Mike Bostock</DD>
    117 </DL>
    118 <HR>
    119 
    120 <P>
    121 <!-- =========== ENUM CONSTANT SUMMARY =========== -->
    122 
    123 <A NAME="enum_constant_summary"><!-- --></A>
    124 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    125 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    126 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    127 <B>Enum Constant Summary</B></FONT></TH>
    128 </TR>
    129 <TR BGCOLOR="white" CLASS="TableRowColor">
    130 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#LOWER_CAMEL">LOWER_CAMEL</A></B></CODE>
    131 
    132 <BR>
    133 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Java variable naming convention, e.g., "lowerCamel".</TD>
    134 </TR>
    135 <TR BGCOLOR="white" CLASS="TableRowColor">
    136 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#LOWER_HYPHEN">LOWER_HYPHEN</A></B></CODE>
    137 
    138 <BR>
    139 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hyphenated variable naming convention, e.g., "lower-hyphen".</TD>
    140 </TR>
    141 <TR BGCOLOR="white" CLASS="TableRowColor">
    142 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#LOWER_UNDERSCORE">LOWER_UNDERSCORE</A></B></CODE>
    143 
    144 <BR>
    145 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C++ variable naming convention, e.g., "lower_underscore".</TD>
    146 </TR>
    147 <TR BGCOLOR="white" CLASS="TableRowColor">
    148 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#UPPER_CAMEL">UPPER_CAMEL</A></B></CODE>
    149 
    150 <BR>
    151 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Java and C++ class naming convention, e.g., "UpperCamel".</TD>
    152 </TR>
    153 <TR BGCOLOR="white" CLASS="TableRowColor">
    154 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#UPPER_UNDERSCORE">UPPER_UNDERSCORE</A></B></CODE>
    155 
    156 <BR>
    157 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE".</TD>
    158 </TR>
    159 </TABLE>
    160 &nbsp;
    161 <!-- ========== METHOD SUMMARY =========== -->
    162 
    163 <A NAME="method_summary"><!-- --></A>
    164 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    165 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    166 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    167 <B>Method Summary</B></FONT></TH>
    168 </TR>
    169 <TR BGCOLOR="white" CLASS="TableRowColor">
    170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    171 <CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
    172 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#to(com.google.common.base.CaseFormat, java.lang.String)">to</A></B>(<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>&nbsp;format,
    173    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
    174 
    175 <BR>
    176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the specified <code>String s</code> from this format to the specified
    177  <code>format</code>.</TD>
    178 </TR>
    179 <TR BGCOLOR="white" CLASS="TableRowColor">
    180 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    181 <CODE>static&nbsp;<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A></CODE></FONT></TD>
    182 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#valueOf(java.lang.String)">valueOf</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
    183 
    184 <BR>
    185 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the enum constant of this type with the specified name.</TD>
    186 </TR>
    187 <TR BGCOLOR="white" CLASS="TableRowColor">
    188 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    189 <CODE>static&nbsp;<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>[]</CODE></FONT></TD>
    190 <TD><CODE><B><A HREF="../../../../com/google/common/base/CaseFormat.html#values()">values</A></B>()</CODE>
    191 
    192 <BR>
    193 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing the constants of this enum type, in
    194 the order they are declared.</TD>
    195 </TR>
    196 </TABLE>
    197 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Enum"><!-- --></A>
    198 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    199 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    200 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A></B></TH>
    201 </TR>
    202 <TR BGCOLOR="white" CLASS="TableRowColor">
    203 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class, java.lang.String)" title="class or interface in java.lang">valueOf</A></CODE></TD>
    204 </TR>
    205 </TABLE>
    206 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
    207 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    208 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    209 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
    210 </TR>
    211 <TR BGCOLOR="white" CLASS="TableRowColor">
    212 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
    213 </TR>
    214 </TABLE>
    215 &nbsp;
    216 <P>
    217 
    218 <!-- ============ ENUM CONSTANT DETAIL =========== -->
    219 
    220 <A NAME="enum_constant_detail"><!-- --></A>
    221 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    222 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    223 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    224 <B>Enum Constant Detail</B></FONT></TH>
    225 </TR>
    226 </TABLE>
    227 
    228 <A NAME="LOWER_HYPHEN"><!-- --></A><H3>
    229 LOWER_HYPHEN</H3>
    230 <PRE>
    231 public static final <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>LOWER_HYPHEN</B></PRE>
    232 <DL>
    233 <DD>Hyphenated variable naming convention, e.g., "lower-hyphen".
    234 <P>
    235 <DL>
    236 </DL>
    237 </DL>
    238 <HR>
    239 
    240 <A NAME="LOWER_UNDERSCORE"><!-- --></A><H3>
    241 LOWER_UNDERSCORE</H3>
    242 <PRE>
    243 public static final <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>LOWER_UNDERSCORE</B></PRE>
    244 <DL>
    245 <DD>C++ variable naming convention, e.g., "lower_underscore".
    246 <P>
    247 <DL>
    248 </DL>
    249 </DL>
    250 <HR>
    251 
    252 <A NAME="LOWER_CAMEL"><!-- --></A><H3>
    253 LOWER_CAMEL</H3>
    254 <PRE>
    255 public static final <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>LOWER_CAMEL</B></PRE>
    256 <DL>
    257 <DD>Java variable naming convention, e.g., "lowerCamel".
    258 <P>
    259 <DL>
    260 </DL>
    261 </DL>
    262 <HR>
    263 
    264 <A NAME="UPPER_CAMEL"><!-- --></A><H3>
    265 UPPER_CAMEL</H3>
    266 <PRE>
    267 public static final <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>UPPER_CAMEL</B></PRE>
    268 <DL>
    269 <DD>Java and C++ class naming convention, e.g., "UpperCamel".
    270 <P>
    271 <DL>
    272 </DL>
    273 </DL>
    274 <HR>
    275 
    276 <A NAME="UPPER_UNDERSCORE"><!-- --></A><H3>
    277 UPPER_UNDERSCORE</H3>
    278 <PRE>
    279 public static final <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>UPPER_UNDERSCORE</B></PRE>
    280 <DL>
    281 <DD>Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE".
    282 <P>
    283 <DL>
    284 </DL>
    285 </DL>
    286 
    287 <!-- ============ METHOD DETAIL ========== -->
    288 
    289 <A NAME="method_detail"><!-- --></A>
    290 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    291 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    292 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    293 <B>Method Detail</B></FONT></TH>
    294 </TR>
    295 </TABLE>
    296 
    297 <A NAME="values()"><!-- --></A><H3>
    298 values</H3>
    299 <PRE>
    300 public static <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>[] <B>values</B>()</PRE>
    301 <DL>
    302 <DD>Returns an array containing the constants of this enum type, in
    303 the order they are declared.  This method may be used to iterate
    304 over the constants as follows:
    305 <pre>
    306 for (CaseFormat c : CaseFormat.values())
    307 &nbsp;   System.out.println(c);
    308 </pre>
    309 <P>
    310 <DD><DL>
    311 
    312 <DT><B>Returns:</B><DD>an array containing the constants of this enum type, in
    313 the order they are declared</DL>
    314 </DD>
    315 </DL>
    316 <HR>
    317 
    318 <A NAME="valueOf(java.lang.String)"><!-- --></A><H3>
    319 valueOf</H3>
    320 <PRE>
    321 public static <A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A> <B>valueOf</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
    322 <DL>
    323 <DD>Returns the enum constant of this type with the specified name.
    324 The string must match <I>exactly</I> an identifier used to declare an
    325 enum constant in this type.  (Extraneous whitespace characters are 
    326 not permitted.)
    327 <P>
    328 <DD><DL>
    329 <DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the enum constant to be returned.
    330 <DT><B>Returns:</B><DD>the enum constant with the specified name
    331 <DT><B>Throws:</B>
    332 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if this enum type has no constant
    333 with the specified name
    334 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if the argument is null</DL>
    335 </DD>
    336 </DL>
    337 <HR>
    338 
    339 <A NAME="to(com.google.common.base.CaseFormat, java.lang.String)"><!-- --></A><H3>
    340 to</H3>
    341 <PRE>
    342 public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>to</B>(<A HREF="../../../../com/google/common/base/CaseFormat.html" title="enum in com.google.common.base">CaseFormat</A>&nbsp;format,
    343                  <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</PRE>
    344 <DL>
    345 <DD>Converts the specified <code>String s</code> from this format to the specified
    346  <code>format</code>. A "best effort" approach is taken; if <code>s</code> does not
    347  conform to the assumed format, then the behavior of this method is
    348  undefined but we make a reasonable effort at converting anyway.
    349 <P>
    350 <DD><DL>
    351 </DL>
    352 </DD>
    353 </DL>
    354 <!-- ========= END OF CLASS DATA ========= -->
    355 <HR>
    356 
    357 
    358 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    359 <A NAME="navbar_bottom"><!-- --></A>
    360 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    361 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    362 <TR>
    363 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    364 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    365 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    366   <TR ALIGN="center" VALIGN="top">
    367   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    368   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    369   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    370   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CaseFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    371   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    372   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    373   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    374   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    375   </TR>
    376 </TABLE>
    377 </TD>
    378 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    379 </EM>
    380 </TD>
    381 </TR>
    382 
    383 <TR>
    384 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    385 &nbsp;PREV CLASS&nbsp;
    386 &nbsp;<A HREF="../../../../com/google/common/base/CharMatcher.html" title="class in com.google.common.base"><B>NEXT CLASS</B></A></FONT></TD>
    387 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    388   <A HREF="../../../../index.html?com/google/common/base/CaseFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    389 &nbsp;<A HREF="CaseFormat.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    390 &nbsp;<SCRIPT type="text/javascript">
    391   <!--
    392   if(window==top) {
    393     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
    394   }
    395   //-->
    396 </SCRIPT>
    397 <NOSCRIPT>
    398   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
    399 </NOSCRIPT>
    400 
    401 
    402 </FONT></TD>
    403 </TR>
    404 <TR>
    405 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    406   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#enum_constant_summary">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    407 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    408 DETAIL:&nbsp;<A HREF="#enum_constant_detail">ENUM CONSTANTS</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    409 </TR>
    410 </TABLE>
    411 <A NAME="skip-navbar_bottom"></A>
    412 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    413 
    414 <HR>
    415 
    416 </BODY>
    417 </HTML>
    418