Package com.google.common.collect
Class Maps.MapDifferenceImpl<K,V>
java.lang.Object
com.google.common.collect.Maps.MapDifferenceImpl<K,V>
- All Implemented Interfaces:
MapDifference<K,V>
- Direct Known Subclasses:
Maps.SortedMapDifferenceImpl
- Enclosing class:
- Maps
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.collect.MapDifference
MapDifference.ValueDifference<V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanareEqual()Returnstrueif there are no differences between the two maps; that is, if the maps are equal.Returns an unmodifiable map describing keys that appear in both maps, but with different values.Returns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps.Returns an unmodifiable map containing the entries from the left map whose keys are not present in the right map.Returns an unmodifiable map containing the entries from the right map whose keys are not present in the left map.booleanCompares the specified object with this instance for equality.inthashCode()Returns the hash code for this instance.toString()
-
Field Details
-
onlyOnLeft
-
onlyOnRight
-
onBoth
-
differences
-
-
Constructor Details
-
MapDifferenceImpl
-
-
Method Details
-
areEqual
public boolean areEqual()Description copied from interface:MapDifferenceReturnstrueif there are no differences between the two maps; that is, if the maps are equal.- Specified by:
areEqualin interfaceMapDifference<K,V>
-
entriesOnlyOnLeft
Description copied from interface:MapDifferenceReturns an unmodifiable map containing the entries from the left map whose keys are not present in the right map.- Specified by:
entriesOnlyOnLeftin interfaceMapDifference<K,V>
-
entriesOnlyOnRight
Description copied from interface:MapDifferenceReturns an unmodifiable map containing the entries from the right map whose keys are not present in the left map.- Specified by:
entriesOnlyOnRightin interfaceMapDifference<K,V>
-
entriesInCommon
Description copied from interface:MapDifferenceReturns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps.- Specified by:
entriesInCommonin interfaceMapDifference<K,V>
-
entriesDiffering
Description copied from interface:MapDifferenceReturns an unmodifiable map describing keys that appear in both maps, but with different values.- Specified by:
entriesDifferingin interfaceMapDifference<K,V>
-
equals
Description copied from interface:MapDifferenceCompares the specified object with this instance for equality. Returnstrueif the given object is also aMapDifferenceand the values returned by theMapDifference.entriesOnlyOnLeft(),MapDifference.entriesOnlyOnRight(),MapDifference.entriesInCommon()andMapDifference.entriesDiffering()of the two instances are equal. -
hashCode
public int hashCode()Description copied from interface:MapDifferenceReturns the hash code for this instance. This is defined as the hash code ofArrays.asList(entriesOnlyOnLeft(), entriesOnlyOnRight(), entriesInCommon(), entriesDiffering()) -
toString
-