java.lang.Object | |
↳ | com.atlassian.crowd.embedded.api.UserComparator |
Supplies re-useable methods for equals, hashcode and compareTo that can be shared with different implementations of
User
in order to be compatible.
You can also instantiate this class to get a Comparator of User.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
USER_COMPARATOR | Singleton instance of Comparator |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether the two User objects are equal according to the contract of the
User interface. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Checks whether the two User objects are equal according to the contract of the User
interface.
If you are implementing equals(Object)
then just write code like this:
public boolean equals(Object o)
{
return (o instanceof User) && UserComparator.equal(this, (User) o);
}
user1 | First User |
---|---|
user2 | Second User |