Interface CatalogDiff


public interface CatalogDiff
This represents a diff results between two catalogs. It offers a handful of convience methods to quickly check if two catalogs are identical or at least have equivalent content.
Since:
1.7.0
Author:
Michael J. Simons
Soundtrack
Pet Shop Boys - Fundamental
  • Method Details

    • between

      static CatalogDiff between(Catalog left, Catalog right)
      Creates a diff between to catalogs
      Parameters:
      left - left catalog
      right - right catalog
      Returns:
      a diff on the given catalogs
    • identical

      boolean identical()
      Returns:
      true if the catalogs are identical, false otherwise
    • equivalent

      boolean equivalent()
      Will always return true when identical() returns true
      Returns:
      true if the catalogs are equivalent, false otherwise
    • getItemsOnlyInLeft

      Collection<CatalogItem<?>> getItemsOnlyInLeft()
      Will always return an empty collection when identical() returns true
      Returns:
      a collection of items that are only in the left catalog
    • getItemsOnlyInRight

      Collection<CatalogItem<?>> getItemsOnlyInRight()
      Will always return an empty collection when identical() returns true
      Returns:
      a collection of items that are only in the right catalog
    • getEquivalentItems

      Collection<CatalogItem<?>> getEquivalentItems()
      Will always return an empty collection when identical() returns true
      Returns:
      a collection of equivalent items