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> 7Uses of Interface com.google.common.base.Function (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="Uses of Interface com.google.common.base.Function (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="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD> 43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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 PREV 59 NEXT</FONT></TD> 60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 61 <A HREF="../../../../../index.html?com/google/common/base//class-useFunction.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="Function.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</TABLE> 78<A NAME="skip-navbar_top"></A> 79<!-- ========= END OF TOP NAVBAR ========= --> 80 81<HR> 82<CENTER> 83<H2> 84<B>Uses of Interface<br>com.google.common.base.Function</B></H2> 85</CENTER> 86 87<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 88<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 89<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 90Packages that use <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A></FONT></TH> 91</TR> 92<TR BGCOLOR="white" CLASS="TableRowColor"> 93<TD><A HREF="#com.google.common.base"><B>com.google.common.base</B></A></TD> 94<TD>Miscellaneous common util classes and annotations. </TD> 95</TR> 96<TR BGCOLOR="white" CLASS="TableRowColor"> 97<TD><A HREF="#com.google.common.collect"><B>com.google.common.collect</B></A></TD> 98<TD>This package contains generic collection interfaces and implementations, and 99 other utilities for working with collections. </TD> 100</TR> 101<TR BGCOLOR="white" CLASS="TableRowColor"> 102<TD><A HREF="#com.google.common.util.concurrent"><B>com.google.common.util.concurrent</B></A></TD> 103<TD> </TD> 104</TR> 105</TABLE> 106 107<P> 108<A NAME="com.google.common.base"><!-- --></A> 109<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 110<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 111<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 112Uses of <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A> in <A HREF="../../../../../com/google/common/base/package-summary.html">com.google.common.base</A></FONT></TH> 113</TR> 114</TABLE> 115 116<P> 117 118<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 119<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> 120<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/google/common/base/package-summary.html">com.google.common.base</A> that return <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A></FONT></TH> 121</TR> 122<TR BGCOLOR="white" CLASS="TableRowColor"> 123<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 124<CODE>static 125<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 126<TR ALIGN="right" VALIGN=""> 127<TD NOWRAP><FONT SIZE="-1"> 128<CODE><A,B,C> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,C></CODE></FONT></TD> 129</TR> 130</TABLE> 131</CODE></FONT></TD> 132<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#compose(com.google.common.base.Function, com.google.common.base.Function)">compose</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><B,C> g, 133 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,? extends B> f)</CODE> 134 135<BR> 136 Returns the composition of two functions.</TD> 137</TR> 138<TR BGCOLOR="white" CLASS="TableRowColor"> 139<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 140<CODE>static 141<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 142<TR ALIGN="right" VALIGN=""> 143<TD NOWRAP><FONT SIZE="-1"> 144<CODE><E> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><<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>,E></CODE></FONT></TD> 145</TR> 146</TABLE> 147</CODE></FONT></TD> 148<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#constant(E)">constant</A></B>(E value)</CODE> 149 150<BR> 151 Creates a function that returns <code>value</code> for any input.</TD> 152</TR> 153<TR BGCOLOR="white" CLASS="TableRowColor"> 154<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 155<CODE>static 156<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 157<TR ALIGN="right" VALIGN=""> 158<TD NOWRAP><FONT SIZE="-1"> 159<CODE><K,V> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><K,V></CODE></FONT></TD> 160</TR> 161</TABLE> 162</CODE></FONT></TD> 163<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#forMap(java.util.Map, V)">forMap</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><K,? extends V> map, 164 V defaultValue)</CODE> 165 166<BR> 167 Returns a function which performs a map lookup with a default value.</TD> 168</TR> 169<TR BGCOLOR="white" CLASS="TableRowColor"> 170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 171<CODE>static 172<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 173<TR ALIGN="right" VALIGN=""> 174<TD NOWRAP><FONT SIZE="-1"> 175<CODE><K,V> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><K,V></CODE></FONT></TD> 176</TR> 177</TABLE> 178</CODE></FONT></TD> 179<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#forMap(java.util.Map)">forMap</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><K,V> map)</CODE> 180 181<BR> 182 Returns a function which performs a map lookup.</TD> 183</TR> 184<TR BGCOLOR="white" CLASS="TableRowColor"> 185<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 186<CODE>static 187<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 188<TR ALIGN="right" VALIGN=""> 189<TD NOWRAP><FONT SIZE="-1"> 190<CODE><T> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><T,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</A>></CODE></FONT></TD> 191</TR> 192</TABLE> 193</CODE></FONT></TD> 194<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#forPredicate(com.google.common.base.Predicate)">forPredicate</A></B>(<A HREF="../../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A><T> predicate)</CODE> 195 196<BR> 197 Creates a function that returns the same boolean output as the given 198 predicate for all inputs.</TD> 199</TR> 200<TR BGCOLOR="white" CLASS="TableRowColor"> 201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 202<CODE>static 203<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 204<TR ALIGN="right" VALIGN=""> 205<TD NOWRAP><FONT SIZE="-1"> 206<CODE><E> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><E,E></CODE></FONT></TD> 207</TR> 208</TABLE> 209</CODE></FONT></TD> 210<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#identity()">identity</A></B>()</CODE> 211 212<BR> 213 Returns the identity function.</TD> 214</TR> 215<TR BGCOLOR="white" CLASS="TableRowColor"> 216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 217<CODE>static <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><<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>,<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> 218<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#toStringFunction()">toStringFunction</A></B>()</CODE> 219 220<BR> 221 Returns a function that calls <code>toString()</code> on its argument.</TD> 222</TR> 223</TABLE> 224 225<P> 226 227<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 228<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> 229<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/google/common/base/package-summary.html">com.google.common.base</A> with parameters of type <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A></FONT></TH> 230</TR> 231<TR BGCOLOR="white" CLASS="TableRowColor"> 232<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 233<CODE>static 234<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 235<TR ALIGN="right" VALIGN=""> 236<TD NOWRAP><FONT SIZE="-1"> 237<CODE><F,T> <A HREF="../../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><T></CODE></FONT></TD> 238</TR> 239</TABLE> 240</CODE></FONT></TD> 241<TD><CODE><B>Suppliers.</B><B><A HREF="../../../../../com/google/common/base/Suppliers.html#compose(com.google.common.base.Function, com.google.common.base.Supplier)">compose</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super F,T> function, 242 <A HREF="../../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><F> first)</CODE> 243 244<BR> 245 Returns a new supplier which is the composition of the provided function 246 and supplier.</TD> 247</TR> 248<TR BGCOLOR="white" CLASS="TableRowColor"> 249<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 250<CODE>static 251<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 252<TR ALIGN="right" VALIGN=""> 253<TD NOWRAP><FONT SIZE="-1"> 254<CODE><A,B,C> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,C></CODE></FONT></TD> 255</TR> 256</TABLE> 257</CODE></FONT></TD> 258<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#compose(com.google.common.base.Function, com.google.common.base.Function)">compose</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><B,C> g, 259 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,? extends B> f)</CODE> 260 261<BR> 262 Returns the composition of two functions.</TD> 263</TR> 264<TR BGCOLOR="white" CLASS="TableRowColor"> 265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 266<CODE>static 267<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 268<TR ALIGN="right" VALIGN=""> 269<TD NOWRAP><FONT SIZE="-1"> 270<CODE><A,B,C> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,C></CODE></FONT></TD> 271</TR> 272</TABLE> 273</CODE></FONT></TD> 274<TD><CODE><B>Functions.</B><B><A HREF="../../../../../com/google/common/base/Functions.html#compose(com.google.common.base.Function, com.google.common.base.Function)">compose</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><B,C> g, 275 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,? extends B> f)</CODE> 276 277<BR> 278 Returns the composition of two functions.</TD> 279</TR> 280<TR BGCOLOR="white" CLASS="TableRowColor"> 281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 282<CODE>static 283<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 284<TR ALIGN="right" VALIGN=""> 285<TD NOWRAP><FONT SIZE="-1"> 286<CODE><A,B> <A HREF="../../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A><A></CODE></FONT></TD> 287</TR> 288</TABLE> 289</CODE></FONT></TD> 290<TD><CODE><B>Predicates.</B><B><A HREF="../../../../../com/google/common/base/Predicates.html#compose(com.google.common.base.Predicate, com.google.common.base.Function)">compose</A></B>(<A HREF="../../../../../com/google/common/base/Predicate.html" title="interface in com.google.common.base">Predicate</A><B> predicate, 291 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><A,? extends B> function)</CODE> 292 293<BR> 294 Returns the composition of a function and a predicate.</TD> 295</TR> 296</TABLE> 297 298<P> 299<A NAME="com.google.common.collect"><!-- --></A> 300<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 301<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 302<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 303Uses of <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A> in <A HREF="../../../../../com/google/common/collect/package-summary.html">com.google.common.collect</A></FONT></TH> 304</TR> 305</TABLE> 306 307<P> 308 309<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 310<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> 311<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/google/common/collect/package-summary.html">com.google.common.collect</A> with parameters of type <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A></FONT></TH> 312</TR> 313<TR BGCOLOR="white" CLASS="TableRowColor"> 314<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 315<CODE>static 316<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 317<TR ALIGN="right" VALIGN=""> 318<TD NOWRAP><FONT SIZE="-1"> 319<CODE><K,V> <A HREF="../../../../../com/google/common/collect/ImmutableListMultimap.html" title="class in com.google.common.collect">ImmutableListMultimap</A><K,V></CODE></FONT></TD> 320</TR> 321</TABLE> 322</CODE></FONT></TD> 323<TD><CODE><B>Multimaps.</B><B><A HREF="../../../../../com/google/common/collect/Multimaps.html#index(java.lang.Iterable, com.google.common.base.Function)">index</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><V> values, 324 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super V,K> keyFunction)</CODE> 325 326<BR> 327 Creates an index <code>ImmutableMultimap</code> that contains the results of 328 applying a specified function to each item in an <code>Iterable</code> of 329 values.</TD> 330</TR> 331<TR BGCOLOR="white" CLASS="TableRowColor"> 332<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 333<CODE> 334<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 335<TR ALIGN="right" VALIGN=""> 336<TD NOWRAP><FONT SIZE="-1"> 337<CODE><K,V> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentMap</A><K,V></CODE></FONT></TD> 338</TR> 339</TABLE> 340</CODE></FONT></TD> 341<TD><CODE><B>MapMaker.</B><B><A HREF="../../../../../com/google/common/collect/MapMaker.html#makeComputingMap(com.google.common.base.Function)">makeComputingMap</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super K,? extends V> computingFunction)</CODE> 342 343<BR> 344 Builds a map that supports atomic, on-demand computation of values.</TD> 345</TR> 346<TR BGCOLOR="white" CLASS="TableRowColor"> 347<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 348<CODE> 349<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 350<TR ALIGN="right" VALIGN=""> 351<TD NOWRAP><FONT SIZE="-1"> 352<CODE><F> <A HREF="../../../../../com/google/common/collect/Ordering.html" title="class in com.google.common.collect">Ordering</A><F></CODE></FONT></TD> 353</TR> 354</TABLE> 355</CODE></FONT></TD> 356<TD><CODE><B>Ordering.</B><B><A HREF="../../../../../com/google/common/collect/Ordering.html#onResultOf(com.google.common.base.Function)">onResultOf</A></B>(<A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><F,? extends <A HREF="../../../../../com/google/common/collect/Ordering.html" title="type parameter in Ordering">T</A>> function)</CODE> 357 358<BR> 359 Returns a new ordering on <code>F</code> which orders elements by first applying 360 a function to them, then comparing those results using <code>this</code>.</TD> 361</TR> 362<TR BGCOLOR="white" CLASS="TableRowColor"> 363<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 364<CODE>static 365<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 366<TR ALIGN="right" VALIGN=""> 367<TD NOWRAP><FONT SIZE="-1"> 368<CODE><F,T> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><T></CODE></FONT></TD> 369</TR> 370</TABLE> 371</CODE></FONT></TD> 372<TD><CODE><B>Collections2.</B><B><A HREF="../../../../../com/google/common/collect/Collections2.html#transform(java.util.Collection, com.google.common.base.Function)">transform</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><F> fromCollection, 373 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super F,T> function)</CODE> 374 375<BR> 376 Returns a collection that applies <code>function</code> to each element of 377 <code>fromCollection</code>.</TD> 378</TR> 379<TR BGCOLOR="white" CLASS="TableRowColor"> 380<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 381<CODE>static 382<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 383<TR ALIGN="right" VALIGN=""> 384<TD NOWRAP><FONT SIZE="-1"> 385<CODE><F,T> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><T></CODE></FONT></TD> 386</TR> 387</TABLE> 388</CODE></FONT></TD> 389<TD><CODE><B>Iterables.</B><B><A HREF="../../../../../com/google/common/collect/Iterables.html#transform(java.lang.Iterable, com.google.common.base.Function)">transform</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><F> fromIterable, 390 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super F,? extends T> function)</CODE> 391 392<BR> 393 Returns an iterable that applies <code>function</code> to each element of <code>fromIterable</code>.</TD> 394</TR> 395<TR BGCOLOR="white" CLASS="TableRowColor"> 396<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 397<CODE>static 398<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 399<TR ALIGN="right" VALIGN=""> 400<TD NOWRAP><FONT SIZE="-1"> 401<CODE><F,T> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><T></CODE></FONT></TD> 402</TR> 403</TABLE> 404</CODE></FONT></TD> 405<TD><CODE><B>Iterators.</B><B><A HREF="../../../../../com/google/common/collect/Iterators.html#transform(java.util.Iterator, com.google.common.base.Function)">transform</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><F> fromIterator, 406 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super F,? extends T> function)</CODE> 407 408<BR> 409 Returns an iterator that applies <code>function</code> to each element of <code>fromIterator</code>.</TD> 410</TR> 411<TR BGCOLOR="white" CLASS="TableRowColor"> 412<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 413<CODE>static 414<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 415<TR ALIGN="right" VALIGN=""> 416<TD NOWRAP><FONT SIZE="-1"> 417<CODE><F,T> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><T></CODE></FONT></TD> 418</TR> 419</TABLE> 420</CODE></FONT></TD> 421<TD><CODE><B>Lists.</B><B><A HREF="../../../../../com/google/common/collect/Lists.html#transform(java.util.List, com.google.common.base.Function)">transform</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><F> fromList, 422 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super F,? extends T> function)</CODE> 423 424<BR> 425 Returns a list that applies <code>function</code> to each element of <code>fromList</code>.</TD> 426</TR> 427<TR BGCOLOR="white" CLASS="TableRowColor"> 428<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 429<CODE>static 430<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 431<TR ALIGN="right" VALIGN=""> 432<TD NOWRAP><FONT SIZE="-1"> 433<CODE><K,V1,V2> <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><K,V2></CODE></FONT></TD> 434</TR> 435</TABLE> 436</CODE></FONT></TD> 437<TD><CODE><B>Maps.</B><B><A HREF="../../../../../com/google/common/collect/Maps.html#transformValues(java.util.Map, com.google.common.base.Function)">transformValues</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><K,V1> fromMap, 438 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super V1,V2> function)</CODE> 439 440<BR> 441 Returns a view of a map where each value is transformed by a function.</TD> 442</TR> 443<TR BGCOLOR="white" CLASS="TableRowColor"> 444<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 445<CODE>static 446<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 447<TR ALIGN="right" VALIGN=""> 448<TD NOWRAP><FONT SIZE="-1"> 449<CODE><K,V> <A HREF="../../../../../com/google/common/collect/ImmutableMap.html" title="class in com.google.common.collect">ImmutableMap</A><K,V></CODE></FONT></TD> 450</TR> 451</TABLE> 452</CODE></FONT></TD> 453<TD><CODE><B>Maps.</B><B><A HREF="../../../../../com/google/common/collect/Maps.html#uniqueIndex(java.lang.Iterable, com.google.common.base.Function)">uniqueIndex</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><V> values, 454 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super V,K> keyFunction)</CODE> 455 456<BR> 457 Returns an immutable map for which the <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"><CODE>Map.values()</CODE></A> are the given 458 elements in the given order, and each key is the product of invoking a 459 supplied function on its corresponding value.</TD> 460</TR> 461</TABLE> 462 463<P> 464<A NAME="com.google.common.util.concurrent"><!-- --></A> 465<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 466<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 467<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 468Uses of <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A> in <A HREF="../../../../../com/google/common/util/concurrent/package-summary.html">com.google.common.util.concurrent</A></FONT></TH> 469</TR> 470</TABLE> 471 472<P> 473 474<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 475<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> 476<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../com/google/common/util/concurrent/package-summary.html">com.google.common.util.concurrent</A> with parameters of type <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A></FONT></TH> 477</TR> 478<TR BGCOLOR="white" CLASS="TableRowColor"> 479<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 480<CODE>static 481<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 482<TR ALIGN="right" VALIGN=""> 483<TD NOWRAP><FONT SIZE="-1"> 484<CODE><I,O> <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><O></CODE></FONT></TD> 485</TR> 486</TABLE> 487</CODE></FONT></TD> 488<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#chain(com.google.common.util.concurrent.ListenableFuture, com.google.common.base.Function)">chain</A></B>(<A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><I> input, 489 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super I,? extends <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><? extends O>> function)</CODE> 490 491<BR> 492 Creates a new <code>ListenableFuture</code> that wraps another 493 <code>ListenableFuture</code>.</TD> 494</TR> 495<TR BGCOLOR="white" CLASS="TableRowColor"> 496<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 497<CODE>static 498<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 499<TR ALIGN="right" VALIGN=""> 500<TD NOWRAP><FONT SIZE="-1"> 501<CODE><I,O> <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><O></CODE></FONT></TD> 502</TR> 503</TABLE> 504</CODE></FONT></TD> 505<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#chain(com.google.common.util.concurrent.ListenableFuture, com.google.common.base.Function, java.util.concurrent.Executor)">chain</A></B>(<A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><I> input, 506 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super I,? extends <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><? extends O>> function, 507 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</A> exec)</CODE> 508 509<BR> 510 Creates a new <code>ListenableFuture</code> that wraps another 511 <code>ListenableFuture</code>.</TD> 512</TR> 513<TR BGCOLOR="white" CLASS="TableRowColor"> 514<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 515<CODE>static 516<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 517<TR ALIGN="right" VALIGN=""> 518<TD NOWRAP><FONT SIZE="-1"> 519<CODE><I,O> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</A><O></CODE></FONT></TD> 520</TR> 521</TABLE> 522</CODE></FONT></TD> 523<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#compose(java.util.concurrent.Future, com.google.common.base.Function)">compose</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</A><I> future, 524 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super I,? extends O> function)</CODE> 525 526<BR> 527 Creates a new <code>Future</code> that wraps another <code>Future</code>.</TD> 528</TR> 529<TR BGCOLOR="white" CLASS="TableRowColor"> 530<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 531<CODE>static 532<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 533<TR ALIGN="right" VALIGN=""> 534<TD NOWRAP><FONT SIZE="-1"> 535<CODE><I,O> <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><O></CODE></FONT></TD> 536</TR> 537</TABLE> 538</CODE></FONT></TD> 539<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#compose(com.google.common.util.concurrent.ListenableFuture, com.google.common.base.Function)">compose</A></B>(<A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><I> future, 540 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super I,? extends O> function)</CODE> 541 542<BR> 543 Creates a new <code>ListenableFuture</code> that wraps another 544 <code>ListenableFuture</code>.</TD> 545</TR> 546<TR BGCOLOR="white" CLASS="TableRowColor"> 547<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 548<CODE>static 549<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 550<TR ALIGN="right" VALIGN=""> 551<TD NOWRAP><FONT SIZE="-1"> 552<CODE><I,O> <A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><O></CODE></FONT></TD> 553</TR> 554</TABLE> 555</CODE></FONT></TD> 556<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#compose(com.google.common.util.concurrent.ListenableFuture, com.google.common.base.Function, java.util.concurrent.Executor)">compose</A></B>(<A HREF="../../../../../com/google/common/util/concurrent/ListenableFuture.html" title="interface in com.google.common.util.concurrent">ListenableFuture</A><I> future, 557 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super I,? extends O> function, 558 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent">Executor</A> exec)</CODE> 559 560<BR> 561 Creates a new <code>ListenableFuture</code> that wraps another 562 <code>ListenableFuture</code>.</TD> 563</TR> 564<TR BGCOLOR="white" CLASS="TableRowColor"> 565<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 566<CODE>static 567<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 568<TR ALIGN="right" VALIGN=""> 569<TD NOWRAP><FONT SIZE="-1"> 570<CODE><T,E extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>> 571<BR> 572<A HREF="../../../../../com/google/common/util/concurrent/CheckedFuture.html" title="interface in com.google.common.util.concurrent">CheckedFuture</A><T,E></CODE></FONT></TD> 573</TR> 574</TABLE> 575</CODE></FONT></TD> 576<TD><CODE><B>Futures.</B><B><A HREF="../../../../../com/google/common/util/concurrent/Futures.html#makeChecked(java.util.concurrent.Future, com.google.common.base.Function)">makeChecked</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent">Future</A><T> future, 577 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>,E> mapper)</CODE> 578 579<BR> 580 Creates a <A HREF="../../../../../com/google/common/util/concurrent/CheckedFuture.html" title="interface in com.google.common.util.concurrent"><CODE>CheckedFuture</CODE></A> out of a normal <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/Future.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>Future</CODE></A> and a 581 <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base"><CODE>Function</CODE></A> that maps from <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><CODE>Exception</CODE></A> instances into the 582 appropriate checked type.</TD> 583</TR> 584</TABLE> 585 586<P> 587<HR> 588 589 590<!-- ======= START OF BOTTOM NAVBAR ====== --> 591<A NAME="navbar_bottom"><!-- --></A> 592<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 593<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 594<TR> 595<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 596<A NAME="navbar_bottom_firstrow"><!-- --></A> 597<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 598 <TR ALIGN="center" VALIGN="top"> 599 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 600 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 601 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../com/google/common/base/Function.html" title="interface in com.google.common.base"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD> 602 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD> 603 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 604 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 605 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 606 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 607 </TR> 608</TABLE> 609</TD> 610<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 611</EM> 612</TD> 613</TR> 614 615<TR> 616<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 617 PREV 618 NEXT</FONT></TD> 619<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 620 <A HREF="../../../../../index.html?com/google/common/base//class-useFunction.html" target="_top"><B>FRAMES</B></A> 621 <A HREF="Function.html" target="_top"><B>NO FRAMES</B></A> 622 <SCRIPT type="text/javascript"> 623 <!-- 624 if(window==top) { 625 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 626 } 627 //--> 628</SCRIPT> 629<NOSCRIPT> 630 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> 631</NOSCRIPT> 632 633 634</FONT></TD> 635</TR> 636</TABLE> 637<A NAME="skip-navbar_bottom"></A> 638<!-- ======== END OF BOTTOM NAVBAR ======= --> 639 640<HR> 641 642</BODY> 643</HTML> 644