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:57 PST 2010 --> 6<TITLE> 7ComparisonChain (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="ComparisonChain (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/ComparisonChain.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/Collections2.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/ComputationException.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/ComparisonChain.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="ComparisonChain.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: NESTED | 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 ComparisonChain</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.collect.ComparisonChain</B> 97</PRE> 98<HR> 99<DL> 100<DT><PRE>public abstract class <B>ComparisonChain</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> 104A utility for performing a "lazy" chained comparison statement, which 105 performs comparisons only until it finds a nonzero result. For example: 106 107 <pre class="code"> <code>public int compareTo(Foo that) { 108 return ComparisonChain.start() 109 .compare(this.aString, that.aString) 110 .compare(this.anInt, that.anInt) 111 .compare(this.anEnum, that.anEnum, Ordering.nullsLast()) 112 .result(); 113 }</code></pre> 114 115 The value of this expression will have the same sign as the <i>first 116 nonzero</i> comparison result in the chain, or will be zero if every 117 comparison result was zero. 118 119 <p>Once any comparison returns a nonzero value, remaining comparisons are 120 "short-circuited". 121<P> 122 123<P> 124<DL> 125<DT><B>Since:</B></DT> 126 <DD>2010.01.04 <b>tentative</b></DD> 127<DT><B>Author:</B></DT> 128 <DD>Mark Davis, Kevin Bourrillion</DD> 129</DL> 130<HR> 131 132<P> 133 134<!-- ========== METHOD SUMMARY =========== --> 135 136<A NAME="method_summary"><!-- --></A> 137<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 138<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 139<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 140<B>Method Summary</B></FONT></TH> 141</TR> 142<TR BGCOLOR="white" CLASS="TableRowColor"> 143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 144<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 145<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(boolean, boolean)">compare</A></B>(boolean left, 146 boolean right)</CODE> 147 148<BR> 149 Compares two <code>boolean</code> values as specified by <A HREF="../../../../com/google/common/primitives/Booleans.html#compare(boolean, boolean)"><CODE>Booleans.compare(boolean, boolean)</CODE></A>, <i>if</i> the result of this comparison chain has not 150 already been determined.</TD> 151</TR> 152<TR BGCOLOR="white" CLASS="TableRowColor"> 153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 154<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 155<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(java.lang.Comparable, java.lang.Comparable)">compare</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A><?> left, 156 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A><?> right)</CODE> 157 158<BR> 159 Compares two comparable objects as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, <i>if</i> the result of this comparison chain 160 has not already been determined.</TD> 161</TR> 162<TR BGCOLOR="white" CLASS="TableRowColor"> 163<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 164<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 165<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(double, double)">compare</A></B>(double left, 166 double right)</CODE> 167 168<BR> 169 Compares two <code>double</code> values as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Double.html?is-external=true#compare(double, double)" title="class or interface in java.lang"><CODE>Double.compare(double, double)</CODE></A>, <i>if</i> the result of this comparison chain has not 170 already been determined.</TD> 171</TR> 172<TR BGCOLOR="white" CLASS="TableRowColor"> 173<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 174<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 175<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(float, float)">compare</A></B>(float left, 176 float right)</CODE> 177 178<BR> 179 Compares two <code>float</code> values as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#compare(float, float)" title="class or interface in java.lang"><CODE>Float.compare(float, float)</CODE></A>, <i>if</i> the result of this comparison chain has not 180 already been determined.</TD> 181</TR> 182<TR BGCOLOR="white" CLASS="TableRowColor"> 183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 184<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 185<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(int, int)">compare</A></B>(int left, 186 int right)</CODE> 187 188<BR> 189 Compares two <code>int</code> values as specified by <A HREF="../../../../com/google/common/primitives/Ints.html#compare(int, int)"><CODE>Ints.compare(int, int)</CODE></A>, 190 <i>if</i> the result of this comparison chain has not already been 191 determined.</TD> 192</TR> 193<TR BGCOLOR="white" CLASS="TableRowColor"> 194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 195<CODE>abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 196<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(long, long)">compare</A></B>(long left, 197 long right)</CODE> 198 199<BR> 200 Compares two <code>long</code> values as specified by <A HREF="../../../../com/google/common/primitives/Longs.html#compare(long, long)"><CODE>Longs.compare(long, long)</CODE></A>, 201 <i>if</i> the result of this comparison chain has not already been 202 determined.</TD> 203</TR> 204<TR BGCOLOR="white" CLASS="TableRowColor"> 205<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 206<CODE>abstract 207<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> 208<TR ALIGN="right" VALIGN=""> 209<TD NOWRAP><FONT SIZE="-1"> 210<CODE><T> <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 211</TR> 212</TABLE> 213</CODE></FONT></TD> 214<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#compare(T, T, java.util.Comparator)">compare</A></B>(T left, 215 T right, 216 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A><T> comparator)</CODE> 217 218<BR> 219 Compares two objects using a comparator, <i>if</i> the result of this 220 comparison chain has not already been determined.</TD> 221</TR> 222<TR BGCOLOR="white" CLASS="TableRowColor"> 223<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 224<CODE>abstract int</CODE></FONT></TD> 225<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#result()">result</A></B>()</CODE> 226 227<BR> 228 Ends this comparison chain and returns its result: a value having the 229 same sign as the first nonzero comparison result in the chain, or zero if 230 every result was zero.</TD> 231</TR> 232<TR BGCOLOR="white" CLASS="TableRowColor"> 233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 234<CODE>static <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A></CODE></FONT></TD> 235<TD><CODE><B><A HREF="../../../../com/google/common/collect/ComparisonChain.html#start()">start</A></B>()</CODE> 236 237<BR> 238 Begins a new chained comparison statement.</TD> 239</TR> 240</TABLE> 241 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 242<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 243<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 244<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> 245</TR> 246<TR BGCOLOR="white" CLASS="TableRowColor"> 247<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> 248</TR> 249</TABLE> 250 251<P> 252 253<!-- ============ METHOD DETAIL ========== --> 254 255<A NAME="method_detail"><!-- --></A> 256<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 257<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 258<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 259<B>Method Detail</B></FONT></TH> 260</TR> 261</TABLE> 262 263<A NAME="start()"><!-- --></A><H3> 264start</H3> 265<PRE> 266public static <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>start</B>()</PRE> 267<DL> 268<DD>Begins a new chained comparison statement. See example in the class 269 documentation. 270<P> 271<DD><DL> 272</DL> 273</DD> 274</DL> 275<HR> 276 277<A NAME="compare(java.lang.Comparable, java.lang.Comparable)"><!-- --></A><H3> 278compare</H3> 279<PRE> 280public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A><?> left, 281 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</A><?> right)</PRE> 282<DL> 283<DD>Compares two comparable objects as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(T)</CODE></A>, <i>if</i> the result of this comparison chain 284 has not already been determined. 285<P> 286<DD><DL> 287</DL> 288</DD> 289</DL> 290<HR> 291 292<A NAME="compare(java.lang.Object,java.lang.Object,java.util.Comparator)"><!-- --></A><A NAME="compare(T, T, java.util.Comparator)"><!-- --></A><H3> 293compare</H3> 294<PRE> 295public abstract <T> <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(<FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT> 296 T left, 297 <FONT SIZE="-1"><A HREF="http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation">@Nullable</A></FONT> 298 T right, 299 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A><T> comparator)</PRE> 300<DL> 301<DD>Compares two objects using a comparator, <i>if</i> the result of this 302 comparison chain has not already been determined. 303<P> 304<DD><DL> 305</DL> 306</DD> 307</DL> 308<HR> 309 310<A NAME="compare(int, int)"><!-- --></A><H3> 311compare</H3> 312<PRE> 313public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(int left, 314 int right)</PRE> 315<DL> 316<DD>Compares two <code>int</code> values as specified by <A HREF="../../../../com/google/common/primitives/Ints.html#compare(int, int)"><CODE>Ints.compare(int, int)</CODE></A>, 317 <i>if</i> the result of this comparison chain has not already been 318 determined. 319<P> 320<DD><DL> 321</DL> 322</DD> 323</DL> 324<HR> 325 326<A NAME="compare(long, long)"><!-- --></A><H3> 327compare</H3> 328<PRE> 329public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(long left, 330 long right)</PRE> 331<DL> 332<DD>Compares two <code>long</code> values as specified by <A HREF="../../../../com/google/common/primitives/Longs.html#compare(long, long)"><CODE>Longs.compare(long, long)</CODE></A>, 333 <i>if</i> the result of this comparison chain has not already been 334 determined. 335<P> 336<DD><DL> 337</DL> 338</DD> 339</DL> 340<HR> 341 342<A NAME="compare(float, float)"><!-- --></A><H3> 343compare</H3> 344<PRE> 345public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(float left, 346 float right)</PRE> 347<DL> 348<DD>Compares two <code>float</code> values as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#compare(float, float)" title="class or interface in java.lang"><CODE>Float.compare(float, float)</CODE></A>, <i>if</i> the result of this comparison chain has not 349 already been determined. 350<P> 351<DD><DL> 352</DL> 353</DD> 354</DL> 355<HR> 356 357<A NAME="compare(double, double)"><!-- --></A><H3> 358compare</H3> 359<PRE> 360public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(double left, 361 double right)</PRE> 362<DL> 363<DD>Compares two <code>double</code> values as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Double.html?is-external=true#compare(double, double)" title="class or interface in java.lang"><CODE>Double.compare(double, double)</CODE></A>, <i>if</i> the result of this comparison chain has not 364 already been determined. 365<P> 366<DD><DL> 367</DL> 368</DD> 369</DL> 370<HR> 371 372<A NAME="compare(boolean, boolean)"><!-- --></A><H3> 373compare</H3> 374<PRE> 375public abstract <A HREF="../../../../com/google/common/collect/ComparisonChain.html" title="class in com.google.common.collect">ComparisonChain</A> <B>compare</B>(boolean left, 376 boolean right)</PRE> 377<DL> 378<DD>Compares two <code>boolean</code> values as specified by <A HREF="../../../../com/google/common/primitives/Booleans.html#compare(boolean, boolean)"><CODE>Booleans.compare(boolean, boolean)</CODE></A>, <i>if</i> the result of this comparison chain has not 379 already been determined. 380<P> 381<DD><DL> 382</DL> 383</DD> 384</DL> 385<HR> 386 387<A NAME="result()"><!-- --></A><H3> 388result</H3> 389<PRE> 390public abstract int <B>result</B>()</PRE> 391<DL> 392<DD>Ends this comparison chain and returns its result: a value having the 393 same sign as the first nonzero comparison result in the chain, or zero if 394 every result was zero. 395<P> 396<DD><DL> 397</DL> 398</DD> 399</DL> 400<!-- ========= END OF CLASS DATA ========= --> 401<HR> 402 403 404<!-- ======= START OF BOTTOM NAVBAR ====== --> 405<A NAME="navbar_bottom"><!-- --></A> 406<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 407<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 408<TR> 409<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 410<A NAME="navbar_bottom_firstrow"><!-- --></A> 411<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 412 <TR ALIGN="center" VALIGN="top"> 413 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 414 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 415 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 416 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ComparisonChain.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 417 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 418 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 419 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 420 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 421 </TR> 422</TABLE> 423</TD> 424<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 425</EM> 426</TD> 427</TR> 428 429<TR> 430<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 431 <A HREF="../../../../com/google/common/collect/Collections2.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 432 <A HREF="../../../../com/google/common/collect/ComputationException.html" title="class in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 433<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 434 <A HREF="../../../../index.html?com/google/common/collect/ComparisonChain.html" target="_top"><B>FRAMES</B></A> 435 <A HREF="ComparisonChain.html" target="_top"><B>NO FRAMES</B></A> 436 <SCRIPT type="text/javascript"> 437 <!-- 438 if(window==top) { 439 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 440 } 441 //--> 442</SCRIPT> 443<NOSCRIPT> 444 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 445</NOSCRIPT> 446 447 448</FONT></TD> 449</TR> 450<TR> 451<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 452 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 453<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 454DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 455</TR> 456</TABLE> 457<A NAME="skip-navbar_bottom"></A> 458<!-- ======== END OF BOTTOM NAVBAR ======= --> 459 460<HR> 461 462</BODY> 463</HTML> 464