From ab11346b3b33677b14b3d0b9d55f1c41afe2174f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 20 Apr 2016 16:50:44 +0200 Subject: [PATCH] Minor: documentation fixed --- .../events/user/AdminUserAddedEvent.java | 131 +++++++++--------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java b/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java index 8284b7a..a4d1fdd 100644 --- a/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java +++ b/src/org/mxchange/jusercore/events/user/AdminUserAddedEvent.java @@ -1,65 +1,66 @@ -/* - * Copyright (C) 2016 Roland Haeder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.mxchange.jusercore.events.user; - -import java.text.MessageFormat; -import org.mxchange.jusercore.model.user.User; - -/** - * An event being fired when the administrator has added a new user account - *

- * @author Roland Haeder - */ -public class AdminUserAddedEvent implements AdminAddedUserEvent { - - /** - * Serial number - */ - private static final long serialVersionUID = 14_785_787_174_676_290L; - - /** - * Added user instance - */ - private final User addedUser; - - /** - * Constructor with added user instance - * @param addedUser Added user instance - */ - public AdminUserAddedEvent (final User addedUser) { - // Is the user instance valid? - if (null == addedUser) { - // Throw NPE - throw new NullPointerException("addedUser is null"); //NOI18N - } else if (addedUser.getUserId() == null) { - // Throw NPE again - throw new NullPointerException("addedUser.userId is null"); //NOI18N - } else if (addedUser.getUserId() < 1) { - // Invalid id number - throw new IllegalArgumentException(MessageFormat.format("addedUser.userId={0} is invalid.", addedUser.getUserId())); //NOI18N - } - - // Set it here - this.addedUser = addedUser; - } - - @Override - public User getAddedUser () { - return this.addedUser; - } - -} +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jusercore.events.user; + +import java.text.MessageFormat; +import org.mxchange.jusercore.model.user.User; + +/** + * An event being fired when the administrator has added a new user account + *

+ * @author Roland Haeder + */ +public class AdminUserAddedEvent implements AdminAddedUserEvent { + + /** + * Serial number + */ + private static final long serialVersionUID = 14_785_787_174_676_290L; + + /** + * Added user instance + */ + private final User addedUser; + + /** + * Constructor with added user instance + *

+ * @param addedUser Added user instance + */ + public AdminUserAddedEvent (final User addedUser) { + // Is the user instance valid? + if (null == addedUser) { + // Throw NPE + throw new NullPointerException("addedUser is null"); //NOI18N + } else if (addedUser.getUserId() == null) { + // Throw NPE again + throw new NullPointerException("addedUser.userId is null"); //NOI18N + } else if (addedUser.getUserId() < 1) { + // Invalid id number + throw new IllegalArgumentException(MessageFormat.format("addedUser.userId={0} is invalid.", addedUser.getUserId())); //NOI18N + } + + // Set it here + this.addedUser = addedUser; + } + + @Override + public User getAddedUser () { + return this.addedUser; + } + +} -- 2.39.5