Add all 23 GoF design pattern implementations (2026-06-13)
This commit is contained in:
8
03-behavioral/visitor/ShapeVisitor.java
Normal file
8
03-behavioral/visitor/ShapeVisitor.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package visitor;
|
||||
|
||||
/** Visitor interface — one visit() method per concrete element type */
|
||||
public interface ShapeVisitor {
|
||||
void visit(Circle circle);
|
||||
void visit(Rectangle rectangle);
|
||||
void visit(Triangle triangle);
|
||||
}
|
||||
Reference in New Issue
Block a user