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.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a equals b, otherwise false.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 forobj.The object. obj)This method returns a hash code for the specified object. |
| equals | back to summary |
|---|---|
| public boolean equals(T a, T b) This method tests if two objects are equal.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode(T obj) This method returns a hash code for the specified object.
| |