X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Addressbook%2Fsrc%2Forg%2Fmxchange%2Faddressbook%2Fmenu%2Fconsole%2FConsoleMenu.java;h=6eff64f6cb6377bcad13ec1cd28900899870af34;hb=9ad193b51551b58af5a9eef70810933f0f6033ee;hp=82d9f6b5b597a95986dd934c614c6e0524bb5827;hpb=c3a6502c11c40b41c5c20988dd7344526d583b14;p=addressbook-lib.git
diff --git a/Addressbook/src/org/mxchange/addressbook/menu/console/ConsoleMenu.java b/Addressbook/src/org/mxchange/addressbook/menu/console/ConsoleMenu.java
index 82d9f6b..6eff64f 100644
--- a/Addressbook/src/org/mxchange/addressbook/menu/console/ConsoleMenu.java
+++ b/Addressbook/src/org/mxchange/addressbook/menu/console/ConsoleMenu.java
@@ -1,35 +1,53 @@
-/*
- * 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 .
- */
-package org.mxchange.addressbook.menu.console;
-
-import org.mxchange.addressbook.client.Client;
-import org.mxchange.addressbook.menu.Menu;
-
-/**
- *
- * @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) {
- this.initMenu(menuType, client);
- }
-}
+/*
+ * 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 .
+ */
+package org.mxchange.addressbook.menu.console;
+
+import java.text.MessageFormat;
+import org.mxchange.addressbook.client.Client;
+import org.mxchange.addressbook.menu.AddressbookMenu;
+import org.mxchange.addressbook.menu.BaseMenu;
+import org.mxchange.addressbook.menu.Menu;
+
+/**
+ *
+ * @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);
+ }
+}