]> git.mxchange.org Git - addressbook-swing.git/blobdiff - src/org/mxchange/addressbook/client/AddressbookClient.java
auto-reformatted most project files
[addressbook-swing.git] / src / org / mxchange / addressbook / client / AddressbookClient.java
index c53c27d2c79168f4545ff4331d84318c9b8889e9..7045abe51a66cadb4cdfe38399d24d64781226d3 100644 (file)
@@ -16,9 +16,9 @@
  */
 package org.mxchange.addressbook.client;
 
-import org.mxchange.jcore.exceptions.MenuInitializationException;
 import org.mxchange.addressbook.menu.item.SelectableMenuItem;
 import org.mxchange.jcore.client.Client;
+import org.mxchange.jcore.exceptions.MenuInitializationException;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
 import org.mxchange.jcore.model.contact.Contact;
 import org.mxchange.jcore.model.contact.gender.Gender;
@@ -31,18 +31,18 @@ import org.mxchange.jcore.model.contact.gender.Gender;
 public interface AddressbookClient extends Client {
 
        /**
-        * The user changes own name data
+        * The user changes own address data
         * <p>
-        * @param contact
+        * @param contact Contact instance to change
         */
-       public void doChangeOwnNameData (final Contact contact);
+       public void doChangeOwnAddressData (final Contact contact);
 
        /**
-        * The user changes own address data
+        * The user changes own name data
         * <p>
-        * @param contact Contact instance to change
+        * @param contact
         */
-       public void doChangeOwnAddressData (final Contact contact);
+       public void doChangeOwnNameData (final Contact contact);
 
        /**
         * The user changes own other data
@@ -58,23 +58,6 @@ public interface AddressbookClient extends Client {
         */
        public Contact doEnterOwnData ();
 
-       /**
-        * Asks the user to enter his/her gender (M=Male, F=Female, C=Company)
-        * <p>
-        * @param message Message to output
-        * @return Gender enum
-        */
-       public Gender enterGender (final String message);
-
-       /**
-        * Let the user choose what to change on the address: [n]ame, [a]ddress,
-        * [o]ther
-        * <p>
-        * @param contact Contact instance to let the user change data
-        * @throws UnhandledUserChoiceException If choice is not supported
-        */
-       public void userChooseChangeContactData (final Contact contact) throws UnhandledUserChoiceException;
-
        /**
         * Asks the user for a choice and proceeds accordingly
         * <p>
@@ -93,17 +76,12 @@ public interface AddressbookClient extends Client {
        public char enterChar (final char[] validChars, final String message);
 
        /**
-        * Reads a string of minimum and maximum length from the user. An empty
-        * string should be generally not allowed, but might be okay for e.g.
-        * company name.
+        * Asks the user to enter his/her gender (M=Male, F=Female, C=Company)
         * <p>
-        * @param minLength     Minimum length of the string to read
-        * @param maxLength     Maximum length of the string to read
-        * @param message       Message to user
-        * @param allowEmpty Whether empty strings are allowed
-        * @return Entered string by user or null if empty string is allowed
+        * @param message Message to output
+        * @return Gender enum
         */
-       public String enterString (final int minLength, final int maxLength, final String message, final boolean allowEmpty);
+       public Gender enterGender (final String message);
 
        /**
         * Reads an integer (int) from the user
@@ -115,6 +93,19 @@ public interface AddressbookClient extends Client {
         */
        public int enterInt (final int minimum, final int maximum, final String message);
 
+       /**
+        * Reads a string of minimum and maximum length from the user. An empty
+        * string should be generally not allowed, but might be okay for e.g.
+        * company name.
+        * <p>
+        * @param minLength     Minimum length of the string to read
+        * @param maxLength     Maximum length of the string to read
+        * @param message       Message to user
+        * @param allowEmpty Whether empty strings are allowed
+        * @return Entered string by user or null if empty string is allowed
+        */
+       public String enterString (final int minLength, final int maxLength, final String message, final boolean allowEmpty);
+
        /**
         * Setter for current menu choice
         * <p>
@@ -131,6 +122,11 @@ public interface AddressbookClient extends Client {
         */
        public SelectableMenuItem getMenuItem (final char accessKey, final String text);
 
+       /**
+        * Shows current menu selection to the user
+        */
+       public void showCurrentMenu ();
+
        /**
         * Shows given menu entry in client
         * <p>
@@ -139,7 +135,11 @@ public interface AddressbookClient extends Client {
        public void showEntry (final SelectableMenuItem item);
 
        /**
-        * Shows current menu selection to the user
+        * Let the user choose what to change on the address: [n]ame, [a]ddress,
+        * [o]ther
+        * <p>
+        * @param contact Contact instance to let the user change data
+        * @throws UnhandledUserChoiceException If choice is not supported
         */
-       public void showCurrentMenu ();
+       public void userChooseChangeContactData (final Contact contact) throws UnhandledUserChoiceException;
 }