- 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 ClassesModifier and TypeInterfaceDescriptionstatic class
Comparator that uses the equals and hash code methods of Objects.static class
Comparator that uses identity for Object equality. -
Field Summary
Fields -
Method Summary
-
Field Details
-
defaultComparator
-
identityComparator
-
-
Method Details
-
equals
-
hashCode
-
longKey
-