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:59 PST 2010 --> 6<TITLE> 7MapDifference (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="MapDifference (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/MapDifference.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/Lists.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 59 <A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="interface 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/MapDifference.html" target="_top"><B>FRAMES</B></A> 62 <A HREF="MapDifference.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> 93Interface MapDifference<K,V></H2> 94<HR> 95<DL> 96<DT><PRE>public interface <B>MapDifference<K,V></B></DL> 97</PRE> 98 99<P> 100An object representing the differences between two maps. 101<P> 102 103<P> 104<DL> 105<DT><B>Since:</B></DT> 106 <DD>2010.01.04 <b>stable</b> (imported from Google Collections Library)</DD> 107<DT><B>Author:</B></DT> 108 <DD>Kevin Bourrillion</DD> 109</DL> 110<HR> 111 112<P> 113<!-- ======== NESTED CLASS SUMMARY ======== --> 114 115<A NAME="nested_class_summary"><!-- --></A> 116<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 117<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 118<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 119<B>Nested Class Summary</B></FONT></TH> 120</TR> 121<TR BGCOLOR="white" CLASS="TableRowColor"> 122<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 123<CODE>static interface</CODE></FONT></TD> 124<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="interface in com.google.common.collect">MapDifference.ValueDifference</A><<A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="type parameter in MapDifference.ValueDifference">V</A>></B></CODE> 125 126<BR> 127 A difference between the mappings from two maps with the same key.</TD> 128</TR> 129</TABLE> 130 131<!-- ========== METHOD SUMMARY =========== --> 132 133<A NAME="method_summary"><!-- --></A> 134<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 135<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 136<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 137<B>Method Summary</B></FONT></TH> 138</TR> 139<TR BGCOLOR="white" CLASS="TableRowColor"> 140<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 141<CODE> boolean</CODE></FONT></TD> 142<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#areEqual()">areEqual</A></B>()</CODE> 143 144<BR> 145 Returns <code>true</code> if there are no differences between the two maps; 146 that is, if the maps are equal.</TD> 147</TR> 148<TR BGCOLOR="white" CLASS="TableRowColor"> 149<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 150<CODE> <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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="interface in com.google.common.collect">MapDifference.ValueDifference</A><<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>>></CODE></FONT></TD> 151<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#entriesDiffering()">entriesDiffering</A></B>()</CODE> 152 153<BR> 154 Returns an unmodifiable map describing keys that appear in both maps, but 155 with different values.</TD> 156</TR> 157<TR BGCOLOR="white" CLASS="TableRowColor"> 158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 159<CODE> <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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>></CODE></FONT></TD> 160<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#entriesInCommon()">entriesInCommon</A></B>()</CODE> 161 162<BR> 163 Returns an unmodifiable map containing the entries that appear in both 164 maps; that is, the intersection of the two maps.</TD> 165</TR> 166<TR BGCOLOR="white" CLASS="TableRowColor"> 167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 168<CODE> <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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>></CODE></FONT></TD> 169<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#entriesOnlyOnLeft()">entriesOnlyOnLeft</A></B>()</CODE> 170 171<BR> 172 Returns an unmodifiable map containing the entries from the left map whose 173 keys are not present in the right map.</TD> 174</TR> 175<TR BGCOLOR="white" CLASS="TableRowColor"> 176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 177<CODE> <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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>></CODE></FONT></TD> 178<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#entriesOnlyOnRight()">entriesOnlyOnRight</A></B>()</CODE> 179 180<BR> 181 Returns an unmodifiable map containing the entries from the right map whose 182 keys are not present in the left map.</TD> 183</TR> 184<TR BGCOLOR="white" CLASS="TableRowColor"> 185<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 186<CODE> boolean</CODE></FONT></TD> 187<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#equals(java.lang.Object)">equals</A></B>(<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> object)</CODE> 188 189<BR> 190 Compares the specified object with this instance for equality.</TD> 191</TR> 192<TR BGCOLOR="white" CLASS="TableRowColor"> 193<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 194<CODE> int</CODE></FONT></TD> 195<TD><CODE><B><A HREF="../../../../com/google/common/collect/MapDifference.html#hashCode()">hashCode</A></B>()</CODE> 196 197<BR> 198 Returns the hash code for this instance.</TD> 199</TR> 200</TABLE> 201 202<P> 203 204<!-- ============ METHOD DETAIL ========== --> 205 206<A NAME="method_detail"><!-- --></A> 207<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 208<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 209<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 210<B>Method Detail</B></FONT></TH> 211</TR> 212</TABLE> 213 214<A NAME="areEqual()"><!-- --></A><H3> 215areEqual</H3> 216<PRE> 217boolean <B>areEqual</B>()</PRE> 218<DL> 219<DD>Returns <code>true</code> if there are no differences between the two maps; 220 that is, if the maps are equal. 221<P> 222<DD><DL> 223</DL> 224</DD> 225</DL> 226<HR> 227 228<A NAME="entriesOnlyOnLeft()"><!-- --></A><H3> 229entriesOnlyOnLeft</H3> 230<PRE> 231<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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>> <B>entriesOnlyOnLeft</B>()</PRE> 232<DL> 233<DD>Returns an unmodifiable map containing the entries from the left map whose 234 keys are not present in the right map. 235<P> 236<DD><DL> 237</DL> 238</DD> 239</DL> 240<HR> 241 242<A NAME="entriesOnlyOnRight()"><!-- --></A><H3> 243entriesOnlyOnRight</H3> 244<PRE> 245<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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>> <B>entriesOnlyOnRight</B>()</PRE> 246<DL> 247<DD>Returns an unmodifiable map containing the entries from the right map whose 248 keys are not present in the left map. 249<P> 250<DD><DL> 251</DL> 252</DD> 253</DL> 254<HR> 255 256<A NAME="entriesInCommon()"><!-- --></A><H3> 257entriesInCommon</H3> 258<PRE> 259<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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>> <B>entriesInCommon</B>()</PRE> 260<DL> 261<DD>Returns an unmodifiable map containing the entries that appear in both 262 maps; that is, the intersection of the two maps. 263<P> 264<DD><DL> 265</DL> 266</DD> 267</DL> 268<HR> 269 270<A NAME="entriesDiffering()"><!-- --></A><H3> 271entriesDiffering</H3> 272<PRE> 273<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="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">K</A>,<A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="interface in com.google.common.collect">MapDifference.ValueDifference</A><<A HREF="../../../../com/google/common/collect/MapDifference.html" title="type parameter in MapDifference">V</A>>> <B>entriesDiffering</B>()</PRE> 274<DL> 275<DD>Returns an unmodifiable map describing keys that appear in both maps, but 276 with different values. 277<P> 278<DD><DL> 279</DL> 280</DD> 281</DL> 282<HR> 283 284<A NAME="equals(java.lang.Object)"><!-- --></A><H3> 285equals</H3> 286<PRE> 287boolean <B>equals</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> 288 <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> object)</PRE> 289<DL> 290<DD>Compares the specified object with this instance for equality. Returns 291 <code>true</code> if the given object is also a <code>MapDifference</code> and the 292 values returned by the <A HREF="../../../../com/google/common/collect/MapDifference.html#entriesOnlyOnLeft()"><CODE>entriesOnlyOnLeft()</CODE></A>, <A HREF="../../../../com/google/common/collect/MapDifference.html#entriesOnlyOnRight()"><CODE>entriesOnlyOnRight()</CODE></A>, <A HREF="../../../../com/google/common/collect/MapDifference.html#entriesInCommon()"><CODE>entriesInCommon()</CODE></A> and <A HREF="../../../../com/google/common/collect/MapDifference.html#entriesDiffering()"><CODE>entriesDiffering()</CODE></A> of the two instances are equal. 293<P> 294<DD><DL> 295<DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><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></CODE></DL> 296</DD> 297<DD><DL> 298</DL> 299</DD> 300</DL> 301<HR> 302 303<A NAME="hashCode()"><!-- --></A><H3> 304hashCode</H3> 305<PRE> 306int <B>hashCode</B>()</PRE> 307<DL> 308<DD>Returns the hash code for this instance. This is defined as the hash code 309 of <pre> <code>Arrays.asList(entriesOnlyOnLeft(), entriesOnlyOnRight(), 310 entriesInCommon(), entriesDiffering())</code></pre> 311<P> 312<DD><DL> 313<DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><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></CODE></DL> 314</DD> 315<DD><DL> 316</DL> 317</DD> 318</DL> 319<!-- ========= END OF CLASS DATA ========= --> 320<HR> 321 322 323<!-- ======= START OF BOTTOM NAVBAR ====== --> 324<A NAME="navbar_bottom"><!-- --></A> 325<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 326<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 327<TR> 328<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 329<A NAME="navbar_bottom_firstrow"><!-- --></A> 330<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 331 <TR ALIGN="center" VALIGN="top"> 332 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 333 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 334 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 335 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MapDifference.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 336 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 337 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 338 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 339 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 340 </TR> 341</TABLE> 342</TD> 343<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 344</EM> 345</TD> 346</TR> 347 348<TR> 349<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 350 <A HREF="../../../../com/google/common/collect/Lists.html" title="class in com.google.common.collect"><B>PREV CLASS</B></A> 351 <A HREF="../../../../com/google/common/collect/MapDifference.ValueDifference.html" title="interface in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> 352<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 353 <A HREF="../../../../index.html?com/google/common/collect/MapDifference.html" target="_top"><B>FRAMES</B></A> 354 <A HREF="MapDifference.html" target="_top"><B>NO FRAMES</B></A> 355 <SCRIPT type="text/javascript"> 356 <!-- 357 if(window==top) { 358 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 359 } 360 //--> 361</SCRIPT> 362<NOSCRIPT> 363 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 364</NOSCRIPT> 365 366 367</FONT></TD> 368</TR> 369<TR> 370<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 371 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 372<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 373DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 374</TR> 375</TABLE> 376<A NAME="skip-navbar_bottom"></A> 377<!-- ======== END OF BOTTOM NAVBAR ======= --> 378 379<HR> 380 381</BODY> 382</HTML> 383