Interface Equivalence<T>

  • Type Parameters:
    T - the type of the dataset item
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Equivalence<T>
    A function to determine whether two dataset items are equivalent.
    • Method Detail

      • defaultEquivalence

        static <T> Equivalence<T> defaultEquivalence()
        Returns a default item equivalence function using Object.equals(java.lang.Object)
        Type Parameters:
        T - the type of the dataset item
        Returns:
        a default item equivalence function
      • isEquivalent

        boolean isEquivalent​(T left,
                             T right)
        Returns true if two given dataset items are equivalent, false otherwise.
        Parameters:
        left - the first item
        right - the second item
        Returns:
        true if left and right are equivalent, false otherwise