Interface MapsDifference.Visitor<K,V>

Type Parameters:
K - The type of the key.
V - The type of the values.
All Known Implementing Classes:
MapsDifference.DefaultVisitor
Enclosing class:
MapsDifference

public static interface MapsDifference.Visitor<K,V>
Interface for visiting map entries differing between two maps.

If you are interested in a visitor that collects all passed elements, please use MapsDifference.collectMapsDifferenceTo(Collection). A dummy implementation that does nothing is available from MapsDifference.ignoreMapsDifference(). For implementing your own visitor, you can inherit from MapsDifference.DefaultVisitor.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    differingValues(K key, V leftValue, V rightValue)
    Accept a map difference.
    void
    leftValueOnly(K key, V leftValue)
     
    void
    rightValueOnly(K key, V rightValue)
     
  • Method Details

    • leftValueOnly

      void leftValueOnly(K key, V leftValue)
    • rightValueOnly

      void rightValueOnly(K key, V rightValue)
    • differingValues

      void differingValues(K key, V leftValue, V rightValue)
      Accept a map difference.
      Parameters:
      key - The key.
      leftValue - The left value.
      rightValue - The right value.