Package org.antlr.v4.runtime.misc
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 ofObject.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
All Methods Instance Methods Abstract Methods 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 Detail
-
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
.
-
-