File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed
acyclic-visitor/src/main/java/com/iluwatar/acyclicvisitor Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 2222 */
2323package com .iluwatar .acyclicvisitor ;
2424
25+ /**
26+ * All ModemVisitor interface extends all visitor interfaces
27+ */
2528public interface AllModemVisitor extends ModemVisitor , ZoomVisitor , HayesVisitor {
2629
2730}
Original file line number Diff line number Diff line change 3030 * <p>
3131 * In this example the visitor base class is {@link ModemVisitor}. The base class of the
3232 * 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}
33+ * each one having its own visitor interface {@link HayesVisitor } and {@link ZoomVisitor}
3434 * respectively. {@link ConfigureForUnixVisitor} and {@link ConfigureForDosVisitor}
3535 * implement each derivative's visit method only if it is required
3636 */
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class Hayes extends Modem {
3333 private static final Logger LOGGER = LoggerFactory .getLogger (ConfigureForDosVisitor .class );
3434
3535 /**
36- * Accept visitor
36+ * Accepts all visitors but honors only HayesVisitor
3737 */
3838 @ Override
3939 public void accept (ModemVisitor modemVisitor ) {
Original file line number Diff line number Diff line change 2323package com .iluwatar .acyclicvisitor ;
2424
2525/**
26- * ModemVisitor interface
26+ * ModemVisitor interface does not contain any visit methods so that it does not
27+ * depend on the visited hierarchy. Each derivative's visit method is declared in
28+ * its own visitor interface
2729 */
2830public interface ModemVisitor {
2931 // Visitor is a degenerate base class for all visitors.
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class Zoom extends Modem {
3333 private static final Logger LOGGER = LoggerFactory .getLogger (ConfigureForDosVisitor .class );
3434
3535 /**
36- * Accept visitor
36+ * Accepts all visitors but honors only ZoomVisitor
3737 */
3838 @ Override
3939 public void accept (ModemVisitor modemVisitor ) {
You can’t perform that action at this time.
0 commit comments