Skip to content

Commit afe85e2

Browse files
Enhancing code format
1 parent 4023944 commit afe85e2

File tree

8 files changed

+15
-37
lines changed

8 files changed

+15
-37
lines changed

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/App.java

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,17 @@
2323
package com.iluwatar.acyclicvisitor;
2424

2525
/**
26-
* The Acyclic Visitor pattern allows new
27-
* functions to be added to existing class
28-
* hierarchies without affecting those
29-
* hierarchies, and without creating the
30-
* dependency cycles that are inherent to
31-
* the GoF Visitor pattern, by making the
32-
* Visitor base class degenerate
26+
* The Acyclic Visitor pattern allows new functions to be added to existing class
27+
* hierarchies without affecting those hierarchies, and without creating the dependency
28+
* cycles that are inherent to the GoF Visitor pattern, by making the Visitor base class
29+
* degenerate
3330
* <p>
34-
* In this example the visitor base
35-
* class is {@link ModemVisitor}.
36-
* The base class of the visited
37-
* hierarchy is {@link Modem} and
38-
* has two children {@link Hayes}
39-
* and {@link Zoom} each one having
40-
* its own visitor interface {@link Hayes}
41-
* and {@link ZoomVisitor} respectively.
42-
* {@link ConfigureForUnixVisitor} and
43-
* {@link ConfigureForDosVisitor} implement
44-
* each derivative's visit method
45-
* only if it is required
31+
* In this example the visitor base class is {@link ModemVisitor}. The base class of the
32+
* visited hierarchy is {@link Modem} and has two children {@link Hayes} and {@link Zoom}
33+
* each one having its own visitor interface {@link Hayes} and {@link ZoomVisitor}
34+
* respectively. {@link ConfigureForUnixVisitor} and {@link ConfigureForDosVisitor}
35+
* implement each derivative's visit method only if it is required
4636
*/
47-
4837
public class App {
4938

5039
/**

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ConfigureForDosVisitor.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
import org.slf4j.LoggerFactory;
2727

2828
/**
29-
* CongigureForDosVisitor class
30-
* implements both zoom's and
31-
* hayes' visit method for Dos
32-
* manufacturer
29+
* CongigureForDosVisitor class implements both zoom's and hayes' visit method
30+
* for Dos manufacturer
3331
*/
34-
3532
public class ConfigureForDosVisitor implements ModemVisitor, HayesVisitor, ZoomVisitor {
3633

3734
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ConfigureForUnixVisitor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
import org.slf4j.LoggerFactory;
2727

2828
/**
29-
* CongigureForDosVisitor class
30-
* implements both zoom's visit
31-
* method for Unix manufacturer
29+
* CongigureForDosVisitor class implements both zoom's visit method for Unix
30+
* manufacturer
3231
*/
3332
public class ConfigureForUnixVisitor implements ModemVisitor, ZoomVisitor {
3433

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Hayes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
import org.slf4j.LoggerFactory;
2727

2828
/**
29-
* Hayes class implements its
30-
* accept method
29+
* Hayes class implements its accept method
3130
*/
32-
3331
public class Hayes extends Modem {
3432

3533
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Modem.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
/**
2626
* Modem abstract class
2727
*/
28-
2928
public abstract class Modem {
3029
public abstract void accept(ModemVisitor modemVisitor);
3130
}

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ModemVisitor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
/**
2626
* ZoomVisitor interface
2727
*/
28-
2928
public interface ModemVisitor {
3029
// Visitor is a degenerate base class for all visitors.
3130
}

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/Zoom.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
import org.slf4j.LoggerFactory;
2727

2828
/**
29-
* Zoom class implements its
30-
* accept method
29+
* Zoom class implements its accept method
3130
*/
32-
3331
public class Zoom extends Modem {
3432

3533
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);

acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor/ZoomVisitor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
/**
2626
* ZoomVisitor interface
2727
*/
28-
2928
public interface ZoomVisitor {
3029
void visit(Zoom zoom);
3130
}

0 commit comments

Comments
 (0)