Class DefaultEquator<T>
java.lang.Object
org.apache.commons.collections4.functors.DefaultEquator<T>
- Type Parameters:
- T- the types of object this- Equatorcan evaluate.
- All Implemented Interfaces:
- Serializable,- Equator<T>
Default 
Equator implementation.- Since:
- 4.0
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intHashcode used fornullobjects.static final DefaultEquatorStatic instance
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> DefaultEquator<T> Factory returning the typed singleton instance.booleanEvaluates the two arguments for their equality.intCalculates the hash for the object, based on the method of equality used in the equate method.
- 
Field Details- 
INSTANCEStatic instance
- 
HASHCODE_NULL
 
- 
- 
Method Details- 
defaultEquatorFactory returning the typed singleton instance.- Type Parameters:
- T- the object type
- Returns:
- the singleton instance
 
- 
equateEvaluates the two arguments for their equality. Delegates toObjects.equals(Object, Object).
- 
hashCalculates the hash for the object, based on the method of equality used in the equate method. This is used for classes that delegate theirequals(Object)method to an Equator (and so must also delegate theirhashCode()method), or for implementations ofHashedMapthat use an Equator for the key objects.- Specified by:
- hashin interface- Equator<T>
- Parameters:
- o- the object to calculate the hash for.
- Returns:
- o.hashCode()if- ois non-- null, else- HASHCODE_NULL.
 
 
-