-
- All Known Implementing Classes:
ObjectComparator.DefaultComparator,ObjectComparator.IdentityComparator
public interface ObjectComparator<T>Interface for equality comparison.The equals and hashCode methods of this interace are used instead of the methods of the compared Objects.
The DefaultComparator implmentation calls the Object's methods.
The IdentityComparator implementation uses
==instead of the equals method of the Object.Updated for generics fredt@users.
- Since:
- 2.0
- Author:
- fredt@users
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classObjectComparator.DefaultComparator<T>Comparator that uses the equals and hash code methods of Objects.static classObjectComparator.IdentityComparator<T>Comparator that uses identity for Object equality.
-
Field Summary
Fields Modifier and Type Field Description static ObjectComparatordefaultComparatorstatic ObjectComparatoridentityComparator
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(T a, T b)inthashCode(T a)longlongKey(T a)
-
-
-
Field Detail
-
defaultComparator
static final ObjectComparator defaultComparator
-
identityComparator
static final ObjectComparator identityComparator
-
-