* @param addressbookUser User instance
*/
public UserAddressbook (final String addressbookName, final User addressbookUser) {
- // Call default constructor
+ // Invoke default constructor
this();
// Set name and user instance
public enum AddressbokStatus implements Serializable {
/**
- * When the addressbook is unlocked
+ * When the address book is unlocked
*/
UNLOCKED("ADDRESSBOOK_STATUS_UNLOCKED"), //NOI18N
/**
- * When the addressbook is locked by administrator
+ * When the address book is locked by administrator
*/
LOCKED("ADDRESSBOOK_STATUS_LOCKED"); //NOI18N
/**
* Constructor
* <p>
- * @param messageKey Message key for this enum
+ * @param messageKey Message key for this enumeration
*/
private AddressbokStatus (final String messageKey) {
+ // Validate parameter
+ if (null == messageKey) {
+ // Throw NPE
+ throw new NullPointerException("messageKey is null"); //NOI18N
+ } else if (messageKey.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("messageKey is empty"); //NOI18N
+ }
+
+ // Set message key
this.messageKey = messageKey;
}