Skip to content

Commit c954a43

Browse files
anuragagarwal561994iluwatar
authored andcommitted
Resolves checkstyle errors for facade factory-kit spatial-partition state step-builder (iluwatar#1077)
* Reduces checkstyle errors in facade * Reduces checkstyle errors in factory-kit * Reduces checkstyle errors in spatial-partition * Reduces checkstyle errors in state * Reduces checkstyle errors in step-builder
1 parent 2628cc0 commit c954a43

File tree

29 files changed

+195
-197
lines changed

29 files changed

+195
-197
lines changed

facade/src/main/java/com/iluwatar/facade/App.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,21 @@
2424
package com.iluwatar.facade;
2525

2626
/**
27-
*
2827
* The Facade design pattern is often used when a system is very complex or difficult to understand
2928
* because the system has a large number of interdependent classes or its source code is
3029
* unavailable. This pattern hides the complexities of the larger system and provides a simpler
3130
* interface to the client. It typically involves a single wrapper class which contains a set of
3231
* members required by client. These members access the system on behalf of the facade client and
3332
* hide the implementation details.
34-
* <p>
35-
* In this example the Facade is ({@link DwarvenGoldmineFacade}) and it provides a simpler interface
36-
* to the goldmine subsystem.
37-
*
33+
*
34+
* <p>In this example the Facade is ({@link DwarvenGoldmineFacade}) and it provides a simpler
35+
* interface to the goldmine subsystem.
3836
*/
3937
public class App {
4038

4139
/**
42-
* Program entry point
43-
*
40+
* Program entry point.
41+
*
4442
* @param args command line args
4543
*/
4644
public static void main(String[] args) {

facade/src/main/java/com/iluwatar/facade/DwarvenCartOperator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
*
3130
* DwarvenCartOperator is one of the goldmine subsystems.
32-
*
3331
*/
3432
public class DwarvenCartOperator extends DwarvenMineWorker {
3533

facade/src/main/java/com/iluwatar/facade/DwarvenGoldDigger.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
*
3130
* DwarvenGoldDigger is one of the goldmine subsystems.
32-
*
3331
*/
3432
public class DwarvenGoldDigger extends DwarvenMineWorker {
3533

facade/src/main/java/com/iluwatar/facade/DwarvenGoldmineFacade.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,24 @@
2727
import java.util.List;
2828

2929
/**
30-
*
31-
* DwarvenGoldmineFacade provides a single interface through which users can operate the subsystems.
32-
*
33-
* This makes the goldmine easier to operate and cuts the dependencies from the goldmine user to the
30+
* DwarvenGoldmineFacade provides a single interface through which users can operate the
3431
* subsystems.
3532
*
33+
* <p>This makes the goldmine easier to operate and cuts the dependencies from the goldmine user to
34+
* the subsystems.
3635
*/
3736
public class DwarvenGoldmineFacade {
3837

3938
private final List<DwarvenMineWorker> workers;
4039

4140
/**
42-
* Constructor
41+
* Constructor.
4342
*/
4443
public DwarvenGoldmineFacade() {
4544
workers = List.of(
46-
new DwarvenGoldDigger(),
47-
new DwarvenCartOperator(),
48-
new DwarvenTunnelDigger());
45+
new DwarvenGoldDigger(),
46+
new DwarvenCartOperator(),
47+
new DwarvenTunnelDigger());
4948
}
5049

5150
public void startNewDay() {
@@ -60,8 +59,10 @@ public void endDay() {
6059
makeActions(workers, DwarvenMineWorker.Action.GO_HOME, DwarvenMineWorker.Action.GO_TO_SLEEP);
6160
}
6261

63-
private static void makeActions(Collection<DwarvenMineWorker> workers,
64-
DwarvenMineWorker.Action... actions) {
62+
private static void makeActions(
63+
Collection<DwarvenMineWorker> workers,
64+
DwarvenMineWorker.Action... actions
65+
) {
6566
for (DwarvenMineWorker worker : workers) {
6667
worker.action(actions);
6768
}

facade/src/main/java/com/iluwatar/facade/DwarvenMineWorker.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
*
3130
* DwarvenMineWorker is one of the goldmine subsystems.
32-
*
3331
*/
3432
public abstract class DwarvenMineWorker {
3533

@@ -75,7 +73,7 @@ private void action(Action action) {
7573
}
7674

7775
/**
78-
* Perform actions
76+
* Perform actions.
7977
*/
8078
public void action(Action... actions) {
8179
for (Action action : actions) {

facade/src/main/java/com/iluwatar/facade/DwarvenTunnelDigger.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
*
3130
* DwarvenTunnelDigger is one of the goldmine subsystems.
32-
*
3331
*/
3432
public class DwarvenTunnelDigger extends DwarvenMineWorker {
3533

factory-kit/src/main/java/com/iluwatar/factorykit/App.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
* Factory-kit is a creational pattern which defines a factory of immutable content
31-
* with separated builder and factory interfaces to deal with the problem of
32-
* creating one of the objects specified directly in the factory-kit instance.
30+
* Factory-kit is a creational pattern which defines a factory of immutable content with separated
31+
* builder and factory interfaces to deal with the problem of creating one of the objects specified
32+
* directly in the factory-kit instance.
3333
*
34-
* <p>
35-
* In the given example {@link WeaponFactory} represents the factory-kit, that contains
36-
* four {@link Builder}s for creating new objects of
37-
* the classes implementing {@link Weapon} interface.
38-
* <br>Each of them can be called with {@link WeaponFactory#create(WeaponType)} method, with
39-
* an input representing an instance of {@link WeaponType} that needs to
40-
* be mapped explicitly with desired class type in the factory instance.
34+
* <p>In the given example {@link WeaponFactory} represents the factory-kit, that contains four
35+
* {@link Builder}s for creating new objects of the classes implementing {@link Weapon} interface.
36+
*
37+
* <p>Each of them can be called with {@link WeaponFactory#create(WeaponType)} method, with
38+
* an input representing an instance of {@link WeaponType} that needs to be mapped explicitly with
39+
* desired class type in the factory instance.
4140
*/
4241
public class App {
4342

factory-kit/src/main/java/com/iluwatar/factorykit/Axe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package com.iluwatar.factorykit;
2525

2626
/**
27-
* Class representing Axe
27+
* Class representing Axe.
2828
*/
2929
public class Axe implements Weapon {
3030
@Override

factory-kit/src/main/java/com/iluwatar/factorykit/Bow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package com.iluwatar.factorykit;
2525

2626
/**
27-
* Class representing Bows
27+
* Class representing Bows.
2828
*/
2929
public class Bow implements Weapon {
3030
@Override

factory-kit/src/main/java/com/iluwatar/factorykit/Spear.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
*/
2323

2424
package com.iluwatar.factorykit;
25+
2526
/**
26-
* Class representing Spear
27+
* Class representing Spear.
2728
*/
2829
public class Spear implements Weapon {
2930
@Override

0 commit comments

Comments
 (0)