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 private
ValueDifferenceImpl(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)
boolean
equals(java.lang.Object object)
Two instances are considered equal if theirMapDifference.ValueDifference.leftValue()
values are equal and theirMapDifference.ValueDifference.rightValue()
values are also equal.int
hashCode()
The hash code equals the valueArrays.asList(leftValue(), rightValue()).hashCode()
.V
leftValue()
Returns the value from the left map (possibly null).V
rightValue()
Returns the value from the right map (possibly null).java.lang.String
toString()
-
-
-
Method Detail
-
create
static <V> MapDifference.ValueDifference<V> create(V left, V right)
-
leftValue
public V leftValue()
Description copied from interface:MapDifference.ValueDifference
Returns the value from the left map (possibly null).- Specified by:
leftValue
in interfaceMapDifference.ValueDifference<V>
-
rightValue
public V rightValue()
Description copied from interface:MapDifference.ValueDifference
Returns the value from the right map (possibly null).- Specified by:
rightValue
in interfaceMapDifference.ValueDifference<V>
-
equals
public boolean equals(@CheckForNull java.lang.Object object)
Description copied from interface:MapDifference.ValueDifference
Two instances are considered equal if theirMapDifference.ValueDifference.leftValue()
values are equal and theirMapDifference.ValueDifference.rightValue()
values are also equal.- Specified by:
equals
in interfaceMapDifference.ValueDifference<V>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Description copied from interface:MapDifference.ValueDifference
The hash code equals the valueArrays.asList(leftValue(), rightValue()).hashCode()
.- Specified by:
hashCode
in interfaceMapDifference.ValueDifference<V>
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-