)
}
)
-public class UserContact implements Contact, Comparable<Contact> {
+public class UserContact implements Contact {
/**
* Serial number
this.contactOwnContact = Boolean.FALSE;
}
- @Override
- public int compareTo (final Contact contact) {
- // contact should not be null
- if (null == contact) {
- throw new NullPointerException("contact is null"); //NOI18N
- }
-
- // Is the contactId the same?
- if (Objects.equals(this.getContactId(), contact.getContactId())) {
- // Same contactId, means same contact
- return 0;
- } else if (this.getContactId() > contact.getContactId()) {
- // This contactId is larger than compared to
- return -1;
- }
-
- // The other contactId is larger
- return 1;
- }
-
@Override
public void copyAll (final Contact contact) {
// Copy all: