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 TypeMethodDescriptionboolean
areEqual()
Returnstrue
if 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.boolean
Compares the specified object with this instance for equality.int
hashCode()
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:MapDifference
Returnstrue
if there are no differences between the two maps; that is, if the maps are equal.- Specified by:
areEqual
in interfaceMapDifference<K,
V>
-
entriesOnlyOnLeft
Description copied from interface:MapDifference
Returns an unmodifiable map containing the entries from the left map whose keys are not present in the right map.- Specified by:
entriesOnlyOnLeft
in interfaceMapDifference<K,
V>
-
entriesOnlyOnRight
Description copied from interface:MapDifference
Returns an unmodifiable map containing the entries from the right map whose keys are not present in the left map.- Specified by:
entriesOnlyOnRight
in interfaceMapDifference<K,
V>
-
entriesInCommon
Description copied from interface:MapDifference
Returns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps.- Specified by:
entriesInCommon
in interfaceMapDifference<K,
V>
-
entriesDiffering
Description copied from interface:MapDifference
Returns an unmodifiable map describing keys that appear in both maps, but with different values.- Specified by:
entriesDiffering
in interfaceMapDifference<K,
V>
-
equals
Description copied from interface:MapDifference
Compares the specified object with this instance for equality. Returnstrue
if the given object is also aMapDifference
and 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:MapDifference
Returns the hash code for this instance. This is defined as the hash code ofArrays.asList(entriesOnlyOnLeft(), entriesOnlyOnRight(), entriesInCommon(), entriesDiffering())
-
toString
-