Class MapDifference<K,​V>

    • Constructor Summary

      Constructors 
      Constructor Description
      MapDifference​(java.util.Map<K,​V> onlyOnLeft, java.util.Map<K,​V> onlyOnRight, java.util.Map<K,​V> onBoth, java.util.Map<K,​IValueDifference<V>> differences)
      Constructor for MapDifference
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean areEqual()
      Returns true if there are no differences between the two maps; that is, if the maps are equal.
      java.util.Map<K,​IValueDifference<V>> entriesDiffering()
      Returns a map describing keys that appear in both maps, but with different values.
      java.util.Map<K,​V> entriesInCommon()
      Returns a map containing the entries that appear in both maps; that is, the intersection of the two maps.
      java.util.Map<K,​V> entriesOnlyOnLeft()
      Returns a map containing the entries from the left map whose keys are not present in the right map.
      java.util.Map<K,​V> entriesOnlyOnRight()
      Returns a map containing the entries from the right map whose keys are not present in the left map.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MapDifference

        public MapDifference​(java.util.Map<K,​V> onlyOnLeft,
                             java.util.Map<K,​V> onlyOnRight,
                             java.util.Map<K,​V> onBoth,
                             java.util.Map<K,​IValueDifference<V>> differences)
        Constructor for MapDifference
        Parameters:
        onlyOnLeft - only on left side
        onlyOnRight - only on right side
        onBoth - on both side
        differences - the differences
    • Method Detail

      • entriesOnlyOnLeft

        public java.util.Map<K,​V> entriesOnlyOnLeft()
        Description copied from interface: IMapDifference
        Returns a map containing the entries from the left map whose keys are not present in the right map.
        Specified by:
        entriesOnlyOnLeft in interface IMapDifference<K,​V>
        Returns:
        map containing the entries from the left map whose keys are not present in the right map
        See Also:
        IMapDifference.entriesOnlyOnLeft()
      • entriesOnlyOnRight

        public java.util.Map<K,​V> entriesOnlyOnRight()
        Description copied from interface: IMapDifference
        Returns a map containing the entries from the right map whose keys are not present in the left map.
        Specified by:
        entriesOnlyOnRight in interface IMapDifference<K,​V>
        Returns:
        map containing the entries from the right map whose keys are not present in the left map
        See Also:
        IMapDifference.entriesOnlyOnRight()
      • entriesInCommon

        public java.util.Map<K,​V> entriesInCommon()
        Description copied from interface: IMapDifference
        Returns a map containing the entries that appear in both maps; that is, the intersection of the two maps.
        Specified by:
        entriesInCommon in interface IMapDifference<K,​V>
        Returns:
        map containing the entries that appear in both maps; that is, the intersection of the two maps
        See Also:
        IMapDifference.entriesInCommon()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()