public final class ObjectEqualityComparator extends AbstractEqualityComparator<Object>
EqualityComparator
uses object equality
for comparisons by calling Object.hashCode()
and Object.equals(java.lang.Object)
.Modifier and Type | Field and Description |
---|---|
static ObjectEqualityComparator |
INSTANCE |
Constructor and Description |
---|
ObjectEqualityComparator() |
public static final ObjectEqualityComparator INSTANCE
public int hashCode(Object obj)
obj.
hashCode()
.obj
- The object.obj
.public boolean equals(Object a, Object b)
null
, this method returns true
. Otherwise if only
a
is null
, this method returns false
. Otherwise,
this method returns the result of
a.
equals
(b)
.a
- The first object to compare.b
- The second object to compare.true
if a
equals b
, otherwise false
.Copyright © 1992-2013 ANTLR. All Rights Reserved.