Interface EqualityComparator<T>

All Known Implementing Classes:
AbstractEqualityComparator, ATNConfigSet.ConfigEqualityComparator, ObjectEqualityComparator

public interface EqualityComparator<T>
This interface provides an abstract concept of object equality independent of Object.equals(java.lang.Object) (object equality) and the == operator (reference equality). It can be used to provide algorithm-specific unordered comparisons without requiring changes to the object itself.
Author:
Sam Harwell
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(T a, T b)
    This method tests if two objects are equal.
    int
    hashCode(T obj)
    This method returns a hash code for the specified object.
  • Method Details

    • hashCode

      int hashCode(T obj)
      This method returns a hash code for the specified object.
      Parameters:
      obj - The object.
      Returns:
      The hash code for obj.
    • equals

      boolean equals(T a, T b)
      This method tests if two objects are equal.
      Parameters:
      a - The first object to compare.
      b - The second object to compare.
      Returns:
      true if a equals b, otherwise false.