// Call other constructor
this();
+ // Validate parameter
+ if (null == customerAccountStatus) {
+ // Throw NPE
+ throw new NullPointerException("customerAccountStatus is null"); //NOI18N
+ } else if (null == customerContact) {
+ // Throw NPE again
+ throw new NullPointerException("customerContact is null"); //NOI18N
+ } else if (null == customerNumber) {
+ // Throw NPE again
+ throw new NullPointerException("customerNumber is null"); //NOI18N
+ } else if (customerNumber.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("customerNumber is empty"); //NOI18N
+ }
+
// Set all parameter
this.customerAccountStatus = customerAccountStatus;
this.customerContact = customerContact;
* @param styleClass CSS style class
*/
private CustomerAccountStatus (final String messageKey, final String styleClass) {
+ // 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
+ } else if (null == styleClass) {
+ // Throw NPE
+ throw new NullPointerException("styleClass is null"); //NOI18N
+ } else if (styleClass.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("styleClass is empty"); //NOI18N
+ }
+
// Set it here
this.messageKey = messageKey;
this.styleClass = styleClass;