Home | History | Annotate | Download | only in primitives
      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:48:00 PST 2010 -->
      6 <TITLE>
      7 Primitives (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="Primitives (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/Primitives.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;<A HREF="../../../../com/google/common/primitives/Longs.html" title="class in com.google.common.primitives"><B>PREV CLASS</B></A>&nbsp;
     59 &nbsp;<A HREF="../../../../com/google/common/primitives/Shorts.html" title="class in com.google.common.primitives"><B>NEXT CLASS</B></A></FONT></TD>
     60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
     61   <A HREF="../../../../index.html?com/google/common/primitives/Primitives.html" target="_top"><B>FRAMES</B></A>  &nbsp;
     62 &nbsp;<A HREF="Primitives.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="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
     80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
     81 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&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.primitives</FONT>
     92 <BR>
     93 Class Primitives</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 "><B>com.google.common.primitives.Primitives</B>
     97 </PRE>
     98 <HR>
     99 <DL>
    100 <DT><PRE>public final class <B>Primitives</B><DT>extends <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></DL>
    101 </PRE>
    102 
    103 <P>
    104 Contains static utility methods pertaining to primitive types and their
    105  corresponding wrapper types.
    106 <P>
    107 
    108 <P>
    109 <DL>
    110 <DT><B>Since:</B></DT>
    111   <DD>2009.09.15 <b>tentative</b></DD>
    112 <DT><B>Author:</B></DT>
    113   <DD>Kevin Bourrillion</DD>
    114 </DL>
    115 <HR>
    116 
    117 <P>
    118 <!-- =========== FIELD SUMMARY =========== -->
    119 
    120 <A NAME="field_summary"><!-- --></A>
    121 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    122 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    123 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    124 <B>Field Summary</B></FONT></TH>
    125 </TR>
    126 <TR BGCOLOR="white" CLASS="TableRowColor">
    127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    128 <CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;</CODE></FONT></TD>
    129 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#PRIMITIVE_TO_WRAPPER_TYPE">PRIMITIVE_TO_WRAPPER_TYPE</A></B></CODE>
    130 
    131 <BR>
    132 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A map from primitive types to their corresponding wrapper types.</TD>
    133 </TR>
    134 <TR BGCOLOR="white" CLASS="TableRowColor">
    135 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    136 <CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;</CODE></FONT></TD>
    137 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#PRIMITIVE_TYPES">PRIMITIVE_TYPES</A></B></CODE>
    138 
    139 <BR>
    140 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All nine primitive types (including void).</TD>
    141 </TR>
    142 <TR BGCOLOR="white" CLASS="TableRowColor">
    143 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    144 <CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;</CODE></FONT></TD>
    145 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#WRAPPER_TO_PRIMITIVE_TYPE">WRAPPER_TO_PRIMITIVE_TYPE</A></B></CODE>
    146 
    147 <BR>
    148 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A map from wrapper types to their corresponding primitive types.</TD>
    149 </TR>
    150 <TR BGCOLOR="white" CLASS="TableRowColor">
    151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    152 <CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;</CODE></FONT></TD>
    153 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#WRAPPER_TYPES">WRAPPER_TYPES</A></B></CODE>
    154 
    155 <BR>
    156 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All nine wrapper types (including Void).</TD>
    157 </TR>
    158 </TABLE>
    159 &nbsp;
    160 <!-- ========== METHOD SUMMARY =========== -->
    161 
    162 <A NAME="method_summary"><!-- --></A>
    163 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    164 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    165 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
    166 <B>Method Summary</B></FONT></TH>
    167 </TR>
    168 <TR BGCOLOR="white" CLASS="TableRowColor">
    169 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    170 <CODE>static&nbsp;boolean</CODE></FONT></TD>
    171 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#isWrapperType(java.lang.Class)">isWrapperType</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&nbsp;type)</CODE>
    172 
    173 <BR>
    174 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if <code>type</code> is one of the nine
    175  primitive-wrapper types, such as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang"><CODE>Integer</CODE></A>.</TD>
    176 </TR>
    177 <TR BGCOLOR="white" CLASS="TableRowColor">
    178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    179 <CODE>static
    180 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
    181 <TR ALIGN="right" VALIGN="">
    182 <TD NOWRAP><FONT SIZE="-1">
    183 <CODE>&lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;</CODE></FONT></TD>
    184 </TR>
    185 </TABLE>
    186 </CODE></FONT></TD>
    187 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#unwrap(java.lang.Class)">unwrap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</CODE>
    188 
    189 <BR>
    190 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the corresponding primitive type of <code>type</code> if it is a
    191  wrapper type; otherwise returns <code>type</code> itself.</TD>
    192 </TR>
    193 <TR BGCOLOR="white" CLASS="TableRowColor">
    194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
    195 <CODE>static
    196 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
    197 <TR ALIGN="right" VALIGN="">
    198 <TD NOWRAP><FONT SIZE="-1">
    199 <CODE>&lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;</CODE></FONT></TD>
    200 </TR>
    201 </TABLE>
    202 </CODE></FONT></TD>
    203 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Primitives.html#wrap(java.lang.Class)">wrap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</CODE>
    204 
    205 <BR>
    206 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the corresponding wrapper type of <code>type</code> if it is a primitive
    207  type; otherwise returns <code>type</code> itself.</TD>
    208 </TR>
    209 </TABLE>
    210 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
    211 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    212 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
    213 <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>
    214 </TR>
    215 <TR BGCOLOR="white" CLASS="TableRowColor">
    216 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.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/Object.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/Object.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/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#hashCode()" title="class or interface in java.lang">hashCode</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#toString()" title="class or interface in java.lang">toString</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>
    217 </TR>
    218 </TABLE>
    219 &nbsp;
    220 <P>
    221 
    222 <!-- ============ FIELD DETAIL =========== -->
    223 
    224 <A NAME="field_detail"><!-- --></A>
    225 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    226 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    227 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    228 <B>Field Detail</B></FONT></TH>
    229 </TR>
    230 </TABLE>
    231 
    232 <A NAME="PRIMITIVE_TO_WRAPPER_TYPE"><!-- --></A><H3>
    233 PRIMITIVE_TO_WRAPPER_TYPE</H3>
    234 <PRE>
    235 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt; <B>PRIMITIVE_TO_WRAPPER_TYPE</B></PRE>
    236 <DL>
    237 <DD>A map from primitive types to their corresponding wrapper types.
    238 <P>
    239 <DL>
    240 </DL>
    241 </DL>
    242 <HR>
    243 
    244 <A NAME="WRAPPER_TO_PRIMITIVE_TYPE"><!-- --></A><H3>
    245 WRAPPER_TO_PRIMITIVE_TYPE</H3>
    246 <PRE>
    247 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt; <B>WRAPPER_TO_PRIMITIVE_TYPE</B></PRE>
    248 <DL>
    249 <DD>A map from wrapper types to their corresponding primitive types.
    250 <P>
    251 <DL>
    252 </DL>
    253 </DL>
    254 <HR>
    255 
    256 <A NAME="PRIMITIVE_TYPES"><!-- --></A><H3>
    257 PRIMITIVE_TYPES</H3>
    258 <PRE>
    259 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt; <B>PRIMITIVE_TYPES</B></PRE>
    260 <DL>
    261 <DD>All nine primitive types (including void).
    262 <P>
    263 <DL>
    264 </DL>
    265 </DL>
    266 <HR>
    267 
    268 <A NAME="WRAPPER_TYPES"><!-- --></A><H3>
    269 WRAPPER_TYPES</H3>
    270 <PRE>
    271 public static final <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt; <B>WRAPPER_TYPES</B></PRE>
    272 <DL>
    273 <DD>All nine wrapper types (including Void).
    274 <P>
    275 <DL>
    276 </DL>
    277 </DL>
    278 
    279 <!-- ============ METHOD DETAIL ========== -->
    280 
    281 <A NAME="method_detail"><!-- --></A>
    282 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
    283 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
    284 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
    285 <B>Method Detail</B></FONT></TH>
    286 </TR>
    287 </TABLE>
    288 
    289 <A NAME="isWrapperType(java.lang.Class)"><!-- --></A><H3>
    290 isWrapperType</H3>
    291 <PRE>
    292 public static boolean <B>isWrapperType</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&nbsp;type)</PRE>
    293 <DL>
    294 <DD>Returns <code>true</code> if <code>type</code> is one of the nine
    295  primitive-wrapper types, such as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang"><CODE>Integer</CODE></A>.
    296 <P>
    297 <DD><DL>
    298 <DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true#isPrimitive()" title="class or interface in java.lang"><CODE>Class.isPrimitive()</CODE></A></DL>
    299 </DD>
    300 </DL>
    301 <HR>
    302 
    303 <A NAME="wrap(java.lang.Class)"><!-- --></A><H3>
    304 wrap</H3>
    305 <PRE>
    306 public static &lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt; <B>wrap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</PRE>
    307 <DL>
    308 <DD>Returns the corresponding wrapper type of <code>type</code> if it is a primitive
    309  type; otherwise returns <code>type</code> itself. Idempotent.
    310  <pre>
    311      wrap(int.class) == Integer.class
    312      wrap(Integer.class) == Integer.class
    313      wrap(String.class) == String.class
    314  </pre>
    315 <P>
    316 <DD><DL>
    317 </DL>
    318 </DD>
    319 </DL>
    320 <HR>
    321 
    322 <A NAME="unwrap(java.lang.Class)"><!-- --></A><H3>
    323 unwrap</H3>
    324 <PRE>
    325 public static &lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt; <B>unwrap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</PRE>
    326 <DL>
    327 <DD>Returns the corresponding primitive type of <code>type</code> if it is a
    328  wrapper type; otherwise returns <code>type</code> itself. Idempotent.
    329  <pre>
    330      unwrap(Integer.class) == int.class
    331      unwrap(int.class) == int.class
    332      unwrap(String.class) == String.class
    333  </pre>
    334 <P>
    335 <DD><DL>
    336 </DL>
    337 </DD>
    338 </DL>
    339 <!-- ========= END OF CLASS DATA ========= -->
    340 <HR>
    341 
    342 
    343 <!-- ======= START OF BOTTOM NAVBAR ====== -->
    344 <A NAME="navbar_bottom"><!-- --></A>
    345 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
    346 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
    347 <TR>
    348 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
    349 <A NAME="navbar_bottom_firstrow"><!-- --></A>
    350 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
    351   <TR ALIGN="center" VALIGN="top">
    352   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
    353   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
    354   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
    355   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Primitives.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
    356   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
    357   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
    358   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
    359   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
    360   </TR>
    361 </TABLE>
    362 </TD>
    363 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
    364 </EM>
    365 </TD>
    366 </TR>
    367 
    368 <TR>
    369 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    370 &nbsp;<A HREF="../../../../com/google/common/primitives/Longs.html" title="class in com.google.common.primitives"><B>PREV CLASS</B></A>&nbsp;
    371 &nbsp;<A HREF="../../../../com/google/common/primitives/Shorts.html" title="class in com.google.common.primitives"><B>NEXT CLASS</B></A></FONT></TD>
    372 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
    373   <A HREF="../../../../index.html?com/google/common/primitives/Primitives.html" target="_top"><B>FRAMES</B></A>  &nbsp;
    374 &nbsp;<A HREF="Primitives.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
    375 &nbsp;<SCRIPT type="text/javascript">
    376   <!--
    377   if(window==top) {
    378     document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
    379   }
    380   //-->
    381 </SCRIPT>
    382 <NOSCRIPT>
    383   <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
    384 </NOSCRIPT>
    385 
    386 
    387 </FONT></TD>
    388 </TR>
    389 <TR>
    390 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    391   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
    392 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
    393 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
    394 </TR>
    395 </TABLE>
    396 <A NAME="skip-navbar_bottom"></A>
    397 <!-- ======== END OF BOTTOM NAVBAR ======= -->
    398 
    399 <HR>
    400 
    401 </BODY>
    402 </HTML>
    403