Package com.google.common.collect
Interface MapDifference.ValueDifference<V>
-
- Enclosing interface:
- MapDifference<K,V>
@DoNotMock("Use Maps.difference") public static interface MapDifference.ValueDifference<V>
A difference between the mappings from two maps with the same key. TheleftValue()andrightValue()are not equal, and one but not both of them may be null.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(@Nullable Object other)Two instances are considered equal if theirleftValue()values are equal and theirrightValue()values are also equal.inthashCode()The hash code equals the valueArrays.asList(leftValue(), rightValue()).hashCode().VleftValue()Returns the value from the left map (possibly null).VrightValue()Returns the value from the right map (possibly null).
-
-
-
Method Detail
-
rightValue
V rightValue()
Returns the value from the right map (possibly null).
-
equals
boolean equals(@Nullable Object other)
Two instances are considered equal if theirleftValue()values are equal and theirrightValue()values are also equal.- Overrides:
equalsin classObject- Parameters:
other- the reference object with which to compare.- Returns:
trueif this object is the same as the obj argument;falseotherwise.- See Also:
Object.hashCode(),HashMap
-
hashCode
int hashCode()
The hash code equals the valueArrays.asList(leftValue(), rightValue()).hashCode().- Overrides:
hashCodein classObject- Returns:
- a hash code value for this object.
- See Also:
Object.equals(java.lang.Object),System.identityHashCode(java.lang.Object)
-
-