|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.DefaultEquator<T>
T
- the types of object this Equator
can evaluate.public class DefaultEquator<T>
Default Equator
implementation.
Field Summary | |
---|---|
static int |
HASHCODE_NULL
Hashcode used for null objects. |
static DefaultEquator<Object> |
INSTANCE
Static instance |
Method Summary | ||
---|---|---|
static
|
defaultEquator()
Factory returning the typed singleton instance. |
|
boolean |
equate(T o1,
T o2)
Evaluates the two arguments for their equality. Delegates to Object.equals(Object) . |
|
int |
hash(T o)
Calculates the hash for the object, based on the method of equality used in the equate method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DefaultEquator<Object> INSTANCE
public static final int HASHCODE_NULL
null
objects.
Method Detail |
---|
public static <T> DefaultEquator<T> defaultEquator()
T
- the object type
public boolean equate(T o1, T o2)
Object.equals(Object)
.
equate
in interface Equator<T>
o1
- the first object to be equated.o2
- the second object to be equated.
public int hash(T o)
equals(Object)
method to an
Equator (and so must also delegate their hashCode()
method), or for implementations
of HashedMap
that use an Equator for the key objects.
hash
in interface Equator<T>
o
- the object to calculate the hash for.
o.hashCode()
if o
is non-
null
, else HASHCODE_NULL
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |