Documentation of 'com.google.common.collect.MapDifference' Java class
MapDifference
com.google.common.collect

Interface MapDifference<K,V>

  • All Known Subinterfaces:
    SortedMapDifference<K,V>


    @GwtCompatible
    public interface MapDifference<K,V>
    An object representing the differences between two maps.
    Since:
    2.0 (imported from Google Collections Library)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  MapDifference.ValueDifference<V>
      A difference between the mappings from two maps with the same key.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and 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,MapDifference.ValueDifference<V>> entriesDiffering()
      Returns an unmodifiable map describing keys that appear in both maps, but with different values.
      java.util.Map<K,V> entriesInCommon()
      Returns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps.
      java.util.Map<K,V> entriesOnlyOnLeft()
      Returns an unmodifiable map containing the entries from the left map whose keys are not present in the right map.
      java.util.Map<K,V> entriesOnlyOnRight()
      Returns an unmodifiable map containing the entries from the right map whose keys are not present in the left map.
      boolean equals(java.lang.Object object)
      Compares the specified object with this instance for equality.
      int hashCode()
      Returns the hash code for this instance.
    • Method Detail

      • areEqual

        boolean areEqual()
        Returns true if there are no differences between the two maps; that is, if the maps are equal.
      • entriesOnlyOnLeft

        java.util.Map<K,V> entriesOnlyOnLeft()
        Returns an unmodifiable map containing the entries from the left map whose keys are not present in the right map.
      • entriesOnlyOnRight

        java.util.Map<K,V> entriesOnlyOnRight()
        Returns an unmodifiable map containing the entries from the right map whose keys are not present in the left map.
      • entriesInCommon

        java.util.Map<K,V> entriesInCommon()
        Returns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps.
      • entriesDiffering

        java.util.Map<K,MapDifference.ValueDifference<V>> entriesDiffering()
        Returns an unmodifiable map describing keys that appear in both maps, but with different values.
      • equals

        boolean equals(@Nullable
                       java.lang.Object object)
        Compares the specified object with this instance for equality. Returns true if the given object is also a MapDifference and the values returned by the entriesOnlyOnLeft(), entriesOnlyOnRight(), entriesInCommon() and entriesDiffering() of the two instances are equal.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        int hashCode()
        Returns the hash code for this instance. This is defined as the hash code of
           
        
           Arrays.asList(entriesOnlyOnLeft(), entriesOnlyOnRight(),
               entriesInCommon(), entriesDiffering())
        Overrides:
        hashCode in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.