package org.mxchange.addressbook.beans.contact;
import java.text.MessageFormat;
+import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.mxchange.jcontacts.contact.UserContact;
import org.mxchange.jcontacts.contact.gender.Gender;
import org.mxchange.jcontacts.contact.utils.ContactUtils;
+import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
import org.mxchange.jcountry.data.Country;
}
@Override
- @SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<Contact> allContacts () {
// Debug message
/* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactController.allContacts: contactList.size()={0} - EXIT!", this.contactList.size()));
// Return un-modified list
- return this.contactList;
+ return Collections.unmodifiableList(this.contactList);
}
@Override
@Override
public boolean hasContacts () {
- return (!this.allContacts().isEmpty());
+ return (!this.contactList.isEmpty());
}
/**