Top Description Methods
org.antlr.v4.runtime.misc

public Interface EqualityComparator<T>

Known Direct Implementers
org.antlr.v4.runtime.misc.AbstractEqualityComparator

This interface provides an abstract concept of object equality independent of Object#equals (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 TypeMethod and Description
public boolean

Returns:

true if a equals b, otherwise false.
equals
(T
The first object to compare.
a
,
T
The second object to compare.
b
)

This method tests if two objects are equal.

public int

Returns:

The hash code for obj.
hashCode
(T
The object.
obj
)

This method returns a hash code for the specified object.

Method Detail

equalsback to summary
public boolean equals(T a, T b)

This method tests if two objects are equal.

Parameters
a:T

The first object to compare.

b:T

The second object to compare.

Returns:boolean

true if a equals b, otherwise false.

hashCodeback to summary
public int hashCode(T obj)

This method returns a hash code for the specified object.

Parameters
obj:T

The object.

Returns:int

The hash code for obj.