-/*\r
- * Copyright (C) 2015 Roland Haeder\r
- *\r
- * This program is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-package org.mxchange.addressbook.menu.console;\r
-\r
-import org.mxchange.addressbook.client.Client;\r
-import org.mxchange.addressbook.menu.AddressbookMenu;\r
-import org.mxchange.addressbook.menu.BaseMenu;\r
-import org.mxchange.addressbook.menu.Menu;\r
-\r
-/**\r
- *\r
- * @author Roland Haeder\r
- */\r
-public class ConsoleMenu extends BaseMenu implements Menu {\r
- /**\r
- * Constructor for this menu\r
- * @param menuType Menu type to initialize\r
- * @param client CLient to call back\r
- */\r
- public ConsoleMenu (final String menuType, final Client client) {\r
- this.initMenu(menuType, client);\r
- \r
- // Add all items\r
- AddressbookMenu.addItemsToList(this.getMenuList(), menuType, client);\r
- }\r
-}\r
+/*
+ * Copyright (C) 2015 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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.menu.console;
+
+import java.text.MessageFormat;
+import org.mxchange.addressbook.menu.AddressbookMenu;
+import org.mxchange.addressbook.menu.BaseMenu;
+import org.mxchange.addressbook.menu.Menu;
+import org.mxchange.jcore.client.Client;
+
+/**
+ *
+ * @author Roland Haeder
+ */
+public class ConsoleMenu extends BaseMenu implements Menu {
+
+ /**
+ * Constructor for this menu
+ *
+ * @param menuType Menu type to initialize
+ * @param client CLient to call back
+ */
+ public ConsoleMenu (final String menuType, final Client client) {
+ // Trace message
+ this.getLogger().trace(MessageFormat.format("menuType={0},client={1} - CALLED!", menuType, client)); //NOI18N
+
+ // Client must not be null
+ if (client == null) {
+ // Abort here
+ throw new NullPointerException("client is null");
+ }
+
+ // Init menu
+ this.initMenu(menuType, client);
+
+ // Add all items
+ AddressbookMenu.addItemsToList(this.getMenuList(), menuType, client);
+ }
+}