Package com.google.common.collect
Class Maps.ValueDifferenceImpl<V>
- java.lang.Object
-
- com.google.common.collect.Maps.ValueDifferenceImpl<V>
-
- All Implemented Interfaces:
MapDifference.ValueDifference<V>
- Enclosing class:
- Maps
static class Maps.ValueDifferenceImpl<V> extends java.lang.Object implements MapDifference.ValueDifference<V>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateValueDifferenceImpl(V left, V right)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static <V> MapDifference.ValueDifference<V>create(V left, V right)booleanequals(java.lang.Object object)Two instances are considered equal if theirMapDifference.ValueDifference.leftValue()values are equal and theirMapDifference.ValueDifference.rightValue()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).java.lang.StringtoString()
-
-
-
Method Detail
-
create
static <V> MapDifference.ValueDifference<V> create(V left, V right)
-
leftValue
public V leftValue()
Description copied from interface:MapDifference.ValueDifferenceReturns the value from the left map (possibly null).- Specified by:
leftValuein interfaceMapDifference.ValueDifference<V>
-
rightValue
public V rightValue()
Description copied from interface:MapDifference.ValueDifferenceReturns the value from the right map (possibly null).- Specified by:
rightValuein interfaceMapDifference.ValueDifference<V>
-
equals
public boolean equals(java.lang.Object object)
Description copied from interface:MapDifference.ValueDifferenceTwo instances are considered equal if theirMapDifference.ValueDifference.leftValue()values are equal and theirMapDifference.ValueDifference.rightValue()values are also equal.- Specified by:
equalsin interfaceMapDifference.ValueDifference<V>- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:MapDifference.ValueDifferenceThe hash code equals the valueArrays.asList(leftValue(), rightValue()).hashCode().- Specified by:
hashCodein interfaceMapDifference.ValueDifference<V>- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-