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:58 PST 2010 --> 6<TITLE> 7ImmutableClassToInstanceMap (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"> 15function windowTitle() 16{ 17 if (location.href.indexOf('is-external=true') == -1) { 18 parent.document.title="ImmutableClassToInstanceMap (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> </TD> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableClassToInstanceMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 <A HREF="../../../../com/google/common/collect/ImmutableBiMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../../index.html?com/google/common/collect/ImmutableClassToInstanceMap.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ImmutableClassToInstanceMap.html" target="_top"><B>NO FRAMES</B></A> 63 <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 81DETAIL: FIELD | CONSTR | <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"> 91com.google.common.collect</FONT> 92<BR> 93Class ImmutableClassToInstanceMap<B></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="../../../../com/google/common/collect/ForwardingObject.html" title="class in com.google.common.collect">com.google.common.collect.ForwardingObject</A> 97 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/google/common/collect/ForwardingMap.html" title="class in com.google.common.collect">com.google.common.collect.ForwardingMap</A><<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><? extends B>,B> 98 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.ImmutableClassToInstanceMap<B></B> 99</PRE> 100<DL> 101<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html" title="interface in com.google.common.collect">ClassToInstanceMap</A><B>, <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><<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><? extends B>,B></DD> 102</DL> 103<HR> 104<DL> 105<DT><PRE>public final class <B>ImmutableClassToInstanceMap<B></B><DT>extends <A HREF="../../../../com/google/common/collect/ForwardingMap.html" title="class in com.google.common.collect">ForwardingMap</A><<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><? extends B>,B><DT>implements <A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html" title="interface in com.google.common.collect">ClassToInstanceMap</A><B></DL> 106</PRE> 107 108<P> 109A class-to-instance map backed by an <A HREF="../../../../com/google/common/collect/ImmutableMap.html" title="class in com.google.common.collect"><CODE>ImmutableMap</CODE></A>. See also <A HREF="../../../../com/google/common/collect/MutableClassToInstanceMap.html" title="class in com.google.common.collect"><CODE>MutableClassToInstanceMap</CODE></A>. 110<P> 111 112<P> 113<DL> 114<DT><B>Since:</B></DT> 115 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 116<DT><B>Author:</B></DT> 117 <DD>Kevin Bourrillion</DD> 118</DL> 119<HR> 120 121<P> 122<!-- ======== NESTED CLASS SUMMARY ======== --> 123 124<A NAME="nested_class_summary"><!-- --></A> 125<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 126<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 127<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 128<B>Nested Class Summary</B></FONT></TH> 129</TR> 130<TR BGCOLOR="white" CLASS="TableRowColor"> 131<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 132<CODE>static class</CODE></FONT></TD> 133<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect">ImmutableClassToInstanceMap.Builder</A><<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="type parameter in ImmutableClassToInstanceMap.Builder">B</A>></B></CODE> 134 135<BR> 136 A builder for creating immutable class-to-instance maps.</TD> 137</TR> 138</TABLE> 139 <A NAME="nested_classes_inherited_from_class_java.util.Map"><!-- --></A> 140<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 141<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 142<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface java.util.<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></B></TH> 143</TR> 144<TR BGCOLOR="white" CLASS="TableRowColor"> 145<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">K</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">V</A>></CODE></TD> 146</TR> 147</TABLE> 148 149 150<!-- ========== METHOD SUMMARY =========== --> 151 152<A NAME="method_summary"><!-- --></A> 153<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 154<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 155<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 156<B>Method Summary</B></FONT></TH> 157</TR> 158<TR BGCOLOR="white" CLASS="TableRowColor"> 159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 160<CODE>static 161<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 162<TR ALIGN="right" VALIGN=""> 163<TD NOWRAP><FONT SIZE="-1"> 164<CODE><B> <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect">ImmutableClassToInstanceMap.Builder</A><B></CODE></FONT></TD> 165</TR> 166</TABLE> 167</CODE></FONT></TD> 168<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html#builder()">builder</A></B>()</CODE> 169 170<BR> 171 Returns a new builder.</TD> 172</TR> 173<TR BGCOLOR="white" CLASS="TableRowColor"> 174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 175<CODE>static 176<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 177<TR ALIGN="right" VALIGN=""> 178<TD NOWRAP><FONT SIZE="-1"> 179<CODE><B,S extends B> 180<BR> 181<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="class in com.google.common.collect">ImmutableClassToInstanceMap</A><B></CODE></FONT></TD> 182</TR> 183</TABLE> 184</CODE></FONT></TD> 185<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html#copyOf(java.util.Map)">copyOf</A></B>(<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><? extends <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><? extends S>,? extends S> map)</CODE> 186 187<BR> 188 Returns an immutable map containing the same entries as <code>map</code>.</TD> 189</TR> 190<TR BGCOLOR="white" CLASS="TableRowColor"> 191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 192<CODE>protected <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><<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><? extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>>,<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>></CODE></FONT></TD> 193<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html#delegate()">delegate</A></B>()</CODE> 194 195<BR> 196 Returns the backing delegate instance that methods are forwarded to.</TD> 197</TR> 198<TR BGCOLOR="white" CLASS="TableRowColor"> 199<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 200<CODE> 201<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 202<TR ALIGN="right" VALIGN=""> 203<TD NOWRAP><FONT SIZE="-1"> 204<CODE><T extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>> 205<BR> 206T</CODE></FONT></TD> 207</TR> 208</TABLE> 209</CODE></FONT></TD> 210<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html#getInstance(java.lang.Class)">getInstance</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><T> type)</CODE> 211 212<BR> 213 Returns the value the specified class is mapped to, or <code>null</code> if no 214 entry for this class is present.</TD> 215</TR> 216<TR BGCOLOR="white" CLASS="TableRowColor"> 217<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 218<CODE> 219<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 220<TR ALIGN="right" VALIGN=""> 221<TD NOWRAP><FONT SIZE="-1"> 222<CODE><T extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>> 223<BR> 224T</CODE></FONT></TD> 225</TR> 226</TABLE> 227</CODE></FONT></TD> 228<TD><CODE><B><A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html#putInstance(java.lang.Class, T)">putInstance</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><T> type, 229 T value)</CODE> 230 231<BR> 232 Guaranteed to throw an exception and leave the map unmodified.</TD> 233</TR> 234</TABLE> 235 <A NAME="methods_inherited_from_class_com.google.common.collect.ForwardingMap"><!-- --></A> 236<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 237<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 238<TH ALIGN="left"><B>Methods inherited from class com.google.common.collect.<A HREF="../../../../com/google/common/collect/ForwardingMap.html" title="class in com.google.common.collect">ForwardingMap</A></B></TH> 239</TR> 240<TR BGCOLOR="white" CLASS="TableRowColor"> 241<TD><CODE><A HREF="../../../../com/google/common/collect/ForwardingMap.html#clear()">clear</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#containsKey(java.lang.Object)">containsKey</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#containsValue(java.lang.Object)">containsValue</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#entrySet()">entrySet</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#get(java.lang.Object)">get</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#hashCode()">hashCode</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#isEmpty()">isEmpty</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#keySet()">keySet</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#put(K, V)">put</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#putAll(java.util.Map)">putAll</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#remove(java.lang.Object)">remove</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#size()">size</A>, <A HREF="../../../../com/google/common/collect/ForwardingMap.html#values()">values</A></CODE></TD> 242</TR> 243</TABLE> 244 <A NAME="methods_inherited_from_class_com.google.common.collect.ForwardingObject"><!-- --></A> 245<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 246<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 247<TH ALIGN="left"><B>Methods inherited from class com.google.common.collect.<A HREF="../../../../com/google/common/collect/ForwardingObject.html" title="class in com.google.common.collect">ForwardingObject</A></B></TH> 248</TR> 249<TR BGCOLOR="white" CLASS="TableRowColor"> 250<TD><CODE><A HREF="../../../../com/google/common/collect/ForwardingObject.html#toString()">toString</A></CODE></TD> 251</TR> 252</TABLE> 253 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 254<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 255<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 256<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> 257</TR> 258<TR BGCOLOR="white" CLASS="TableRowColor"> 259<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#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#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> 260</TR> 261</TABLE> 262 <A NAME="methods_inherited_from_class_java.util.Map"><!-- --></A> 263<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 264<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 265<TH ALIGN="left"><B>Methods inherited from interface java.util.<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></B></TH> 266</TR> 267<TR BGCOLOR="white" CLASS="TableRowColor"> 268<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#clear()" title="class or interface in java.util">clear</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsKey(java.lang.Object)" title="class or interface in java.util">containsKey</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util">containsValue</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#entrySet()" title="class or interface in java.util">entrySet</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util">get</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#keySet()" title="class or interface in java.util">keySet</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util">put</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util">putAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#size()" title="class or interface in java.util">size</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#values()" title="class or interface in java.util">values</A></CODE></TD> 269</TR> 270</TABLE> 271 272<P> 273 274<!-- ============ METHOD DETAIL ========== --> 275 276<A NAME="method_detail"><!-- --></A> 277<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 278<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 279<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 280<B>Method Detail</B></FONT></TH> 281</TR> 282</TABLE> 283 284<A NAME="builder()"><!-- --></A><H3> 285builder</H3> 286<PRE> 287public static <B> <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect">ImmutableClassToInstanceMap.Builder</A><B> <B>builder</B>()</PRE> 288<DL> 289<DD>Returns a new builder. The generated builder is equivalent to the builder 290 created by the <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect"><CODE>ImmutableClassToInstanceMap.Builder</CODE></A> constructor. 291<P> 292<DD><DL> 293</DL> 294</DD> 295<DD><DL> 296</DL> 297</DD> 298</DL> 299<HR> 300 301<A NAME="copyOf(java.util.Map)"><!-- --></A><H3> 302copyOf</H3> 303<PRE> 304public static <B,S extends B> <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="class in com.google.common.collect">ImmutableClassToInstanceMap</A><B> <B>copyOf</B>(<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><? extends <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><? extends S>,? extends S> map)</PRE> 305<DL> 306<DD>Returns an immutable map containing the same entries as <code>map</code>. If 307 <code>map</code> somehow contains entries with duplicate keys (for example, if 308 it is a <code>SortedMap</code> whose comparator is not <i>consistent with 309 equals</i>), the results of this method are undefined. 310 311 <p><b>Note:</b> Despite what the method name suggests, if <code>map</code> is 312 an <code>ImmutableClassToInstanceMap</code>, no copy will actually be performed. 313<P> 314<DD><DL> 315</DL> 316</DD> 317<DD><DL> 318 319<DT><B>Throws:</B> 320<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 any key or value in <code>map</code> is null 321<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</A></CODE> - if any value is not an instance of the type 322 specified by its key</DL> 323</DD> 324</DL> 325<HR> 326 327<A NAME="delegate()"><!-- --></A><H3> 328delegate</H3> 329<PRE> 330protected <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><<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><? extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>>,<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>> <B>delegate</B>()</PRE> 331<DL> 332<DD><B>Description copied from class: <CODE><A HREF="../../../../com/google/common/collect/ForwardingObject.html#delegate()">ForwardingObject</A></CODE></B></DD> 333<DD>Returns the backing delegate instance that methods are forwarded to. 334 Abstract subclasses generally override this method with an abstract method 335 that has a more specific return type, such as <A HREF="../../../../com/google/common/collect/ForwardingSet.html#delegate()"><CODE>ForwardingSet.delegate()</CODE></A>. Concrete subclasses override this method to supply 336 the instance being decorated. 337<P> 338<DD><DL> 339<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ForwardingMap.html#delegate()">delegate</A></CODE> in class <CODE><A HREF="../../../../com/google/common/collect/ForwardingMap.html" title="class in com.google.common.collect">ForwardingMap</A><<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><? extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>>,<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>></CODE></DL> 340</DD> 341<DD><DL> 342</DL> 343</DD> 344</DL> 345<HR> 346 347<A NAME="getInstance(java.lang.Class)"><!-- --></A><H3> 348getInstance</H3> 349<PRE> 350public <T extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>> T <B>getInstance</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><T> type)</PRE> 351<DL> 352<DD><B>Description copied from interface: <CODE><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html#getInstance(java.lang.Class)">ClassToInstanceMap</A></CODE></B></DD> 353<DD>Returns the value the specified class is mapped to, or <code>null</code> if no 354 entry for this class is present. This will only return a value that was 355 bound to this specific class, not a value that may have been bound to a 356 subtype. 357<P> 358<DD><DL> 359<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html#getInstance(java.lang.Class)">getInstance</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html" title="interface in com.google.common.collect">ClassToInstanceMap</A><<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>></CODE></DL> 360</DD> 361<DD><DL> 362</DL> 363</DD> 364</DL> 365<HR> 366 367<A NAME="putInstance(java.lang.Class,java.lang.Object)"><!-- --></A><A NAME="putInstance(java.lang.Class, T)"><!-- --></A><H3> 368putInstance</H3> 369<PRE> 370public <T extends <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>> T <B>putInstance</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><T> type, 371 T value)</PRE> 372<DL> 373<DD>Guaranteed to throw an exception and leave the map unmodified. 374<P> 375<DD><DL> 376<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html#putInstance(java.lang.Class, T)">putInstance</A></CODE> in interface <CODE><A HREF="../../../../com/google/common/collect/ClassToInstanceMap.html" title="interface in com.google.common.collect">ClassToInstanceMap</A><<A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.html" title="type parameter in ImmutableClassToInstanceMap">B</A>></CODE></DL> 377</DD> 378<DD><DL> 379 380<DT><B>Returns:</B><DD>the value previously associated with this class (possibly <code>null</code>), or <code>null</code> if there was no previous entry. 381<DT><B>Throws:</B> 382<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - always</DL> 383</DD> 384</DL> 385<!-- ========= END OF CLASS DATA ========= --> 386<HR> 387 388 389<!-- ======= START OF BOTTOM NAVBAR ====== --> 390<A NAME="navbar_bottom"><!-- --></A> 391<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 392<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 393<TR> 394<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 395<A NAME="navbar_bottom_firstrow"><!-- --></A> 396<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 397 <TR ALIGN="center" VALIGN="top"> 398 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 399 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 400 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 401 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ImmutableClassToInstanceMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 402 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 403 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 404 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 405 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 406 </TR> 407</TABLE> 408</TD> 409<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 410</EM> 411</TD> 412</TR> 413 414<TR> 415<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 416 <A HREF="../../../../com/google/common/collect/ImmutableBiMap.Builder.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 417 <A HREF="../../../../com/google/common/collect/ImmutableClassToInstanceMap.Builder.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 418<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 419 <A HREF="../../../../index.html?com/google/common/collect/ImmutableClassToInstanceMap.html" target="_top"><B>FRAMES</B></A> 420 <A HREF="ImmutableClassToInstanceMap.html" target="_top"><B>NO FRAMES</B></A> 421 <SCRIPT type="text/javascript"> 422 <!-- 423 if(window==top) { 424 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 425 } 426 //--> 427</SCRIPT> 428<NOSCRIPT> 429 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 430</NOSCRIPT> 431 432 433</FONT></TD> 434</TR> 435<TR> 436<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 437 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 438<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 439DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 440</TR> 441</TABLE> 442<A NAME="skip-navbar_bottom"></A> 443<!-- ======== END OF BOTTOM NAVBAR ======= --> 444 445<HR> 446 447</BODY> 448</HTML> 449