diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java index 07d13423a..af8e731c8 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/App.java @@ -28,46 +28,47 @@ import com.iluwatar.featuretoggle.pattern.propertiesversion.PropertiesFeatureTog import com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion; import com.iluwatar.featuretoggle.user.User; import com.iluwatar.featuretoggle.user.UserGroup; +import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Properties; - /** - * The Feature Toggle pattern allows for complete code executions to be turned on or off with ease. This allows features - * to be controlled by either dynamic methods just as {@link User} information or by {@link Properties}. In the App - * below there are two examples. Firstly the {@link Properties} version of the feature toggle, where the enhanced - * version of the welcome message which is personalised is turned either on or off at instance creation. This method - * is not as dynamic as the {@link User} driven version where the feature of the personalised welcome message is + * The Feature Toggle pattern allows for complete code executions to be turned on or off with ease. + * This allows features to be controlled by either dynamic methods just as {@link User} information + * or by {@link Properties}. In the App below there are two examples. Firstly the {@link Properties} + * version of the feature toggle, where the enhanced version of the welcome message which is + * personalised is turned either on or off at instance creation. This method is not as dynamic as + * the {@link User} driven version where the feature of the personalised welcome message is * dependant on the {@link UserGroup} the {@link User} is in. So if the user is a memeber of the * {@link UserGroup#isPaid(User)} then they get an ehanced version of the welcome message. * - * Note that this pattern can easily introduce code complexity, and if not kept in check can result in redundant - * unmaintained code within the codebase. - * + *
Note that this pattern can easily introduce code complexity, and if not kept in check can + * result in redundant unmaintained code within the codebase. */ public class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); /** - * Block 1 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} setting the feature - * toggle to enabled. + * Block 1 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} + * setting the feature toggle to enabled. * - * Block 2 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} setting the feature - * toggle to disabled. Notice the difference with the printed welcome message the username is not included. + *
Block 2 shows the {@link PropertiesFeatureToggleVersion} being run with {@link Properties} + * setting the feature toggle to disabled. Notice the difference with the printed welcome message + * the username is not included. * - * Block 3 shows the {@link com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} being - * set up with two users on who is on the free level, while the other is on the paid level. When the - * {@link Service#getWelcomeMessage(User)} is called with the paid {@link User} note that the welcome message - * contains their username, while the same service call with the free tier user is more generic. No username is - * printed. + *
Block 3 shows the {@link + * com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} being set up with + * two users on who is on the free level, while the other is on the paid level. When the {@link + * Service#getWelcomeMessage(User)} is called with the paid {@link User} note that the welcome + * message contains their username, while the same service call with the free tier user is more + * generic. No username is printed. * - * @see User - * @see UserGroup - * @see Service - * @see PropertiesFeatureToggleVersion - * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion + * @see User + * @see UserGroup + * @see Service + * @see PropertiesFeatureToggleVersion + * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion */ public static void main(String[] args) { @@ -82,11 +83,12 @@ public class App { final Properties turnedOff = new Properties(); turnedOff.put("enhancedWelcome", false); Service turnedOffService = new PropertiesFeatureToggleVersion(turnedOff); - final String welcomeMessageturnedOff = turnedOffService.getWelcomeMessage(new User("Jamie No Code")); + final String welcomeMessageturnedOff = + turnedOffService.getWelcomeMessage(new User("Jamie No Code")); LOGGER.info(welcomeMessageturnedOff); // -------------------------------------------- - + Service service2 = new TieredFeatureToggleVersion(); final User paidUser = new User("Jamie Coder"); diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java index ee2360b98..bd276f592 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/Service.java @@ -26,10 +26,11 @@ package com.iluwatar.featuretoggle.pattern; import com.iluwatar.featuretoggle.user.User; /** - * Simple interfaces to allow the calling of the method to generate the welcome message for a given user. While there is - * a helper method to gather the the status of the feature toggle. In some cases there is no need for the - * {@link Service#isEnhanced()} in {@link com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} - * where the toggle is determined by the actual {@link User}. + * Simple interfaces to allow the calling of the method to generate the welcome message for a given + * user. While there is a helper method to gather the the status of the feature toggle. In some + * cases there is no need for the {@link Service#isEnhanced()} in {@link + * com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} where the toggle is + * determined by the actual {@link User}. * * @see com.iluwatar.featuretoggle.pattern.propertiesversion.PropertiesFeatureToggleVersion * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java index 0696cf487..6e2281b9a 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/propertiesversion/PropertiesFeatureToggleVersion.java @@ -25,16 +25,16 @@ package com.iluwatar.featuretoggle.pattern.propertiesversion; import com.iluwatar.featuretoggle.pattern.Service; import com.iluwatar.featuretoggle.user.User; - import java.util.Properties; /** - * This example of the Feature Toogle pattern is less dynamic version than - * {@link com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} where the feature is turned on - * or off at the time of creation of the service. This example uses simple Java {@link Properties} however it could as - * easily be done with an external configuration file loaded by Spring and so on. A good example of when to use this - * version of the feature toggle is when new features are being developed. So you could have a configuration property - * boolean named development or some sort of system environment variable. + * This example of the Feature Toogle pattern is less dynamic version than {@link + * com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion} where the feature is + * turned on or off at the time of creation of the service. This example uses simple Java {@link + * Properties} however it could as easily be done with an external configuration file loaded by + * Spring and so on. A good example of when to use this version of the feature toggle is when new + * features are being developed. So you could have a configuration property boolean named + * development or some sort of system environment variable. * * @see Service * @see com.iluwatar.featuretoggle.pattern.tieredversion.TieredFeatureToggleVersion @@ -45,9 +45,10 @@ public class PropertiesFeatureToggleVersion implements Service { private boolean isEnhanced; /** - * Creates an instance of {@link PropertiesFeatureToggleVersion} using the passed {@link Properties} to determine, - * the status of the feature toggle {@link PropertiesFeatureToggleVersion#isEnhanced()}. There is also some defensive - * code to ensure the {@link Properties} passed are as expected. + * Creates an instance of {@link PropertiesFeatureToggleVersion} using the passed {@link + * Properties} to determine, the status of the feature toggle {@link + * PropertiesFeatureToggleVersion#isEnhanced()}. There is also some defensive code to ensure the + * {@link Properties} passed are as expected. * * @param properties {@link Properties} used to configure the service and toggle features. * @throws IllegalArgumentException when the passed {@link Properties} is not as expected @@ -66,14 +67,14 @@ public class PropertiesFeatureToggleVersion implements Service { } /** - * Generate a welcome message based on the user being passed and the status of the feature toggle. If the enhanced - * version is enabled, then the message will be personalised with the name of the passed {@link User}. However if - * disabled then a generic version fo the message is returned. + * Generate a welcome message based on the user being passed and the status of the feature toggle. + * If the enhanced version is enabled, then the message will be personalised with the name of the + * passed {@link User}. However if disabled then a generic version fo the message is returned. * - * @param user the {@link User} to be displayed in the message if the enhanced version is enabled see - * {@link PropertiesFeatureToggleVersion#isEnhanced()}. If the enhanced version is enabled, then the - * message will be personalised with the name of the passed {@link User}. However if disabled then a - * generic version fo the message is returned. + * @param user the {@link User} to be displayed in the message if the enhanced version is enabled + * see {@link PropertiesFeatureToggleVersion#isEnhanced()}. If the enhanced version is + * enabled, then the message will be personalised with the name of the passed {@link + * User}. However if disabled then a generic version fo the message is returned. * @return Resulting welcome message. * @see User */ @@ -88,9 +89,9 @@ public class PropertiesFeatureToggleVersion implements Service { } /** - * Method that checks if the welcome message to be returned is the enhanced venison or not. For this service it will - * see the value of the boolean that was set in the constructor - * {@link PropertiesFeatureToggleVersion#PropertiesFeatureToggleVersion(Properties)} + * Method that checks if the welcome message to be returned is the enhanced venison or not. For + * this service it will see the value of the boolean that was set in the constructor {@link + * PropertiesFeatureToggleVersion#PropertiesFeatureToggleVersion(Properties)} * * @return Boolean value {@code true} if enhanced. */ diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java index 9f50d280a..448218070 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/pattern/tieredversion/TieredFeatureToggleVersion.java @@ -28,11 +28,12 @@ import com.iluwatar.featuretoggle.user.User; import com.iluwatar.featuretoggle.user.UserGroup; /** - * This example of the Feature Toogle pattern shows how it could be implemented based on a {@link User}. Therefore - * showing its use within a tiered application where the paying users get access to different content or - * better versions of features. So in this instance a {@link User} is passed in and if they are found to be - * on the {@link UserGroup#isPaid(User)} they are welcomed with a personalised message. While the other is more - * generic. However this pattern is limited to simple examples such as the one below. + * This example of the Feature Toogle pattern shows how it could be implemented based on a {@link + * User}. Therefore showing its use within a tiered application where the paying users get access to + * different content or better versions of features. So in this instance a {@link User} is passed in + * and if they are found to be on the {@link UserGroup#isPaid(User)} they are welcomed with a + * personalised message. While the other is more generic. However this pattern is limited to simple + * examples such as the one below. * * @see Service * @see User @@ -42,12 +43,13 @@ import com.iluwatar.featuretoggle.user.UserGroup; public class TieredFeatureToggleVersion implements Service { /** - * Generates a welcome message from the passed {@link User}. The resulting message depends on the group of the - * {@link User}. So if the {@link User} is in the {@link UserGroup#paidGroup} then the enhanced version of the - * welcome message will be returned where the username is displayed. + * Generates a welcome message from the passed {@link User}. The resulting message depends on the + * group of the {@link User}. So if the {@link User} is in the {@link UserGroup#paidGroup} then + * the enhanced version of the welcome message will be returned where the username is displayed. * - * @param user the {@link User} to generate the welcome message for, different messages are displayed if the user is - * in the {@link UserGroup#isPaid(User)} or {@link UserGroup#freeGroup} + * @param user the {@link User} to generate the welcome message for, different messages are + * displayed if the user is in the {@link UserGroup#isPaid(User)} or {@link + * UserGroup#freeGroup} * @return Resulting welcome message. * @see User * @see UserGroup @@ -62,9 +64,9 @@ public class TieredFeatureToggleVersion implements Service { } /** - * Method that checks if the welcome message to be returned is the enhanced version. For this instance as the logic - * is driven by the user group. This method is a little redundant. However can be used to show that there is an - * enhanced version available. + * Method that checks if the welcome message to be returned is the enhanced version. For this + * instance as the logic is driven by the user group. This method is a little redundant. However + * can be used to show that there is an enhanced version available. * * @return Boolean value {@code true} if enhanced. */ diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java index 263d5ce92..5c660ca59 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/User.java @@ -24,7 +24,8 @@ package com.iluwatar.featuretoggle.user; /** - * Used to demonstrate the purpose of the feature toggle. This class actually has nothing to do with the pattern. + * Used to demonstrate the purpose of the feature toggle. This class actually has nothing to do with + * the pattern. */ public class User { @@ -41,7 +42,9 @@ public class User { /** * {@inheritDoc} - * @return The {@link String} representation of the User, in this case just return the name of the user. + * + * @return The {@link String} representation of the User, in this case just return the name of the + * user. */ @Override public String toString() { diff --git a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java index 40325041b..524ea6ef8 100644 --- a/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java +++ b/feature-toggle/src/main/java/com/iluwatar/featuretoggle/user/UserGroup.java @@ -27,8 +27,9 @@ import java.util.ArrayList; import java.util.List; /** - * Contains the lists of users of different groups paid and free. Used to demonstrate the tiered example of feature - * toggle. Allowing certain features to be available to only certain groups of users. + * Contains the lists of users of different groups paid and free. Used to demonstrate the tiered + * example of feature toggle. Allowing certain features to be available to only certain groups of + * users. * * @see User */ @@ -76,7 +77,6 @@ public class UserGroup { * Method to take a {@link User} to determine if the user is in the {@link UserGroup#paidGroup}. * * @param user {@link User} to check if they are in the {@link UserGroup#paidGroup} - * * @return true if the {@link User} is in {@link UserGroup#paidGroup} */ public static boolean isPaid(User user) { diff --git a/fluentinterface/src/main/java/com/iluwatar/fluentinterface/app/App.java b/fluentinterface/src/main/java/com/iluwatar/fluentinterface/app/App.java index 36766a568..b3f8fc0b6 100644 --- a/fluentinterface/src/main/java/com/iluwatar/fluentinterface/app/App.java +++ b/fluentinterface/src/main/java/com/iluwatar/fluentinterface/app/App.java @@ -23,39 +23,37 @@ package com.iluwatar.fluentinterface.app; +import static java.lang.String.valueOf; + import com.iluwatar.fluentinterface.fluentiterable.FluentIterable; import com.iluwatar.fluentinterface.fluentiterable.lazy.LazyFluentIterable; import com.iluwatar.fluentinterface.fluentiterable.simple.SimpleFluentIterable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.StringJoiner; import java.util.function.Function; import java.util.function.Predicate; - -import static java.lang.String.valueOf; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The Fluent Interface pattern is useful when you want to provide an easy readable, flowing API. * Those interfaces tend to mimic domain specific languages, so they can nearly be read as human * languages. - *
- * In this example two implementations of a {@link FluentIterable} interface are given. The + * + *
In this example two implementations of a {@link FluentIterable} interface are given. The
* {@link SimpleFluentIterable} evaluates eagerly and would be too costly for real world
* applications. The {@link LazyFluentIterable} is evaluated on termination. Their usage is
* demonstrated with a simple number list that is filtered, transformed and collected. The result is
* printed afterwards.
- *
*/
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
- * Program entry point
+ * Program entry point.
*/
public static void main(String[] args) {
@@ -90,16 +88,16 @@ public class App {
List
- * This example has two views: menu and content. They represent typical main menu and content area
- * of a web page. When menu item is clicked it triggers events through the dispatcher. The events
- * are received and handled by the stores updating their data as needed. The stores then notify the
- * views that they should rerender themselves.
- *
- * http://facebook.github.io/flux/docs/overview.html
*
+ * This example has two views: menu and content. They represent typical main menu and content
+ * area of a web page. When menu item is clicked it triggers events through the dispatcher. The
+ * events are received and handled by the stores updating their data as needed. The stores then
+ * notify the views that they should rerender themselves.
+ *
+ * http://facebook.github.io/flux/docs/overview.html
*/
public class App {
/**
- * Program entry point
- *
+ * Program entry point.
+ *
* @param args command line args
*/
public static void main(String[] args) {
diff --git a/flux/src/main/java/com/iluwatar/flux/dispatcher/Dispatcher.java b/flux/src/main/java/com/iluwatar/flux/dispatcher/Dispatcher.java
index ec8221c69..206ef8b3f 100644
--- a/flux/src/main/java/com/iluwatar/flux/dispatcher/Dispatcher.java
+++ b/flux/src/main/java/com/iluwatar/flux/dispatcher/Dispatcher.java
@@ -23,20 +23,17 @@
package com.iluwatar.flux.dispatcher;
-import java.util.LinkedList;
-import java.util.List;
-
import com.iluwatar.flux.action.Action;
import com.iluwatar.flux.action.Content;
import com.iluwatar.flux.action.ContentAction;
import com.iluwatar.flux.action.MenuAction;
import com.iluwatar.flux.action.MenuItem;
import com.iluwatar.flux.store.Store;
+import java.util.LinkedList;
+import java.util.List;
/**
- *
* Dispatcher sends Actions to registered Stores.
- *
*/
public final class Dispatcher {
@@ -44,7 +41,8 @@ public final class Dispatcher {
private List
- * In this example {@link AlchemistShop} has great amount of potions on its shelves. To fill the
+ *
+ * In this example {@link AlchemistShop} has great amount of potions on its shelves. To fill the
* shelves {@link AlchemistShop} uses {@link PotionFactory} (which represents the Flyweight in this
* example). Internally {@link PotionFactory} holds a map of the potions and lazily creates new ones
* when requested.
- *
- * To enable safe sharing, between clients and threads, Flyweight objects must be immutable.
+ *
+ * To enable safe sharing, between clients and threads, Flyweight objects must be immutable.
* Flyweight objects are by definition value objects.
- *
*/
public class App {
/**
- * Program entry point
- *
+ * Program entry point.
+ *
* @param args command line args
*/
public static void main(String[] args) {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/HealingPotion.java b/flyweight/src/main/java/com/iluwatar/flyweight/HealingPotion.java
index af0fb95b4..8a02b7007 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/HealingPotion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/HealingPotion.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
- * HealingPotion
- *
+ * HealingPotion.
*/
public class HealingPotion implements Potion {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/HolyWaterPotion.java b/flyweight/src/main/java/com/iluwatar/flyweight/HolyWaterPotion.java
index c5426bf53..ebe0c88d4 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/HolyWaterPotion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/HolyWaterPotion.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
- * HolyWaterPotion
- *
+ * HolyWaterPotion.
*/
public class HolyWaterPotion implements Potion {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/InvisibilityPotion.java b/flyweight/src/main/java/com/iluwatar/flyweight/InvisibilityPotion.java
index 922f921dd..3a3b2d638 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/InvisibilityPotion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/InvisibilityPotion.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
- * InvisibilityPotion
- *
+ * InvisibilityPotion.
*/
public class InvisibilityPotion implements Potion {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/PoisonPotion.java b/flyweight/src/main/java/com/iluwatar/flyweight/PoisonPotion.java
index 4ba9b0719..4641e7986 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/PoisonPotion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/PoisonPotion.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
- * PoisonPotion
- *
+ * PoisonPotion.
*/
public class PoisonPotion implements Potion {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/Potion.java b/flyweight/src/main/java/com/iluwatar/flyweight/Potion.java
index 4fc1b5dbd..ac89dd1bb 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/Potion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/Potion.java
@@ -24,9 +24,7 @@
package com.iluwatar.flyweight;
/**
- *
* Interface for Potions.
- *
*/
public interface Potion {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/PotionFactory.java b/flyweight/src/main/java/com/iluwatar/flyweight/PotionFactory.java
index 843bf2717..19edf0e21 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/PotionFactory.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/PotionFactory.java
@@ -27,11 +27,9 @@ import java.util.EnumMap;
import java.util.Map;
/**
- *
* PotionFactory is the Flyweight in this example. It minimizes memory use by sharing object
* instances. It holds a map of potion instances and new potions are created only when none of the
* type already exists.
- *
*/
public class PotionFactory {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/PotionType.java b/flyweight/src/main/java/com/iluwatar/flyweight/PotionType.java
index 04650206a..84cf5fbc0 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/PotionType.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/PotionType.java
@@ -24,9 +24,7 @@
package com.iluwatar.flyweight;
/**
- *
* Enumeration for potion types.
- *
*/
public enum PotionType {
diff --git a/flyweight/src/main/java/com/iluwatar/flyweight/StrengthPotion.java b/flyweight/src/main/java/com/iluwatar/flyweight/StrengthPotion.java
index 60dc8bc39..c8011b4f7 100644
--- a/flyweight/src/main/java/com/iluwatar/flyweight/StrengthPotion.java
+++ b/flyweight/src/main/java/com/iluwatar/flyweight/StrengthPotion.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
- * StrengthPotion
- *
+ * StrengthPotion.
*/
public class StrengthPotion implements Potion {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/App.java b/front-controller/src/main/java/com/iluwatar/front/controller/App.java
index 949182eb2..7388a06f8 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/App.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/App.java
@@ -24,30 +24,27 @@
package com.iluwatar.front.controller;
/**
- *
* The Front Controller is a presentation tier pattern. Essentially it defines a controller that
* handles all requests for a web site.
- *
- * The Front Controller pattern consolidates request handling through a single handler object (
+ *
+ * The Front Controller pattern consolidates request handling through a single handler object (
* {@link FrontController}). This object can carry out the common the behavior such as
* authorization, request logging and routing requests to corresponding views.
- *
- * Typically the requests are mapped to command objects ({@link Command}) which then display the
- * correct view ({@link View}).
- *
- * In this example we have implemented two views: {@link ArcherView} and {@link CatapultView}. These
- * are displayed by sending correct request to the {@link FrontController} object. For example, the
- * {@link ArcherView} gets displayed when {@link FrontController} receives request "Archer". When
- * the request is unknown, we display the error view ({@link ErrorView}).
*
+ * Typically the requests are mapped to command objects ({@link Command}) which then display the
+ * correct view ({@link View}).
+ *
+ * In this example we have implemented two views: {@link ArcherView} and {@link CatapultView}.
+ * These are displayed by sending correct request to the {@link FrontController} object. For
+ * example, the {@link ArcherView} gets displayed when {@link FrontController} receives request
+ * "Archer". When the request is unknown, we display the error view ({@link ErrorView}).
*/
public class App {
/**
- * Program entry point
- *
- * @param args
- * command line args
+ * Program entry point.
+ *
+ * @param args command line args
*/
public static void main(String[] args) {
FrontController controller = new FrontController();
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/ApplicationException.java b/front-controller/src/main/java/com/iluwatar/front/controller/ApplicationException.java
index 58cacdb73..46949f879 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/ApplicationException.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/ApplicationException.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
- * Custom exception type
- *
+ * Custom exception type.
*/
public class ApplicationException extends RuntimeException {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/ArcherCommand.java b/front-controller/src/main/java/com/iluwatar/front/controller/ArcherCommand.java
index 312565cc6..46509476d 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/ArcherCommand.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/ArcherCommand.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
* Command for archers.
- *
*/
public class ArcherCommand implements Command {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/ArcherView.java b/front-controller/src/main/java/com/iluwatar/front/controller/ArcherView.java
index eecc79a32..d767dd80f 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/ArcherView.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/ArcherView.java
@@ -27,12 +27,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
* View for archers.
- *
*/
public class ArcherView implements View {
-
+
private static final Logger LOGGER = LoggerFactory.getLogger(ArcherView.class);
@Override
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/CatapultCommand.java b/front-controller/src/main/java/com/iluwatar/front/controller/CatapultCommand.java
index 0a8142af3..29f66502a 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/CatapultCommand.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/CatapultCommand.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
* Command for catapults.
- *
*/
public class CatapultCommand implements Command {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/CatapultView.java b/front-controller/src/main/java/com/iluwatar/front/controller/CatapultView.java
index 148d21594..58cbf282c 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/CatapultView.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/CatapultView.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
* View for catapults.
- *
*/
public class CatapultView implements View {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/Command.java b/front-controller/src/main/java/com/iluwatar/front/controller/Command.java
index 573b98aa8..04d42f4f2 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/Command.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/Command.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
* Commands are the intermediary between requests and views.
- *
*/
public interface Command {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/ErrorView.java b/front-controller/src/main/java/com/iluwatar/front/controller/ErrorView.java
index 33806cba9..c7c012a31 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/ErrorView.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/ErrorView.java
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
* View for errors.
- *
*/
public class ErrorView implements View {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/FrontController.java b/front-controller/src/main/java/com/iluwatar/front/controller/FrontController.java
index 1c81b9354..91535f9e0 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/FrontController.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/FrontController.java
@@ -24,10 +24,8 @@
package com.iluwatar.front.controller;
/**
- *
* FrontController is the handler class that takes in all the requests and renders the correct
* response.
- *
*/
public class FrontController {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/UnknownCommand.java b/front-controller/src/main/java/com/iluwatar/front/controller/UnknownCommand.java
index 652eee02f..b03a3dd1f 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/UnknownCommand.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/UnknownCommand.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
* Default command in case the mapping is not successful.
- *
*/
public class UnknownCommand implements Command {
diff --git a/front-controller/src/main/java/com/iluwatar/front/controller/View.java b/front-controller/src/main/java/com/iluwatar/front/controller/View.java
index e5d020801..8b46637d3 100644
--- a/front-controller/src/main/java/com/iluwatar/front/controller/View.java
+++ b/front-controller/src/main/java/com/iluwatar/front/controller/View.java
@@ -24,9 +24,7 @@
package com.iluwatar.front.controller;
/**
- *
* Views are the representations rendered for the user.
- *
*/
public interface View {