接口 ShapeVisitor
- 所有已知实现类:
JsonExportVisitor
,XmlExportVisitor
public interface ShapeVisitor
ShapeVisitor interface for implementing the Visitor pattern.
This allows operations to be performed on shape objects without
modifying their classes.
-
方法概要
-
方法详细资料
-
visit
Visit a Circle shape- 参数:
circle
- the circle to visit
-
visit
Visit a Rectangle shape- 参数:
rectangle
- the rectangle to visit
-
visit
Visit a Line shape- 参数:
line
- the line to visit
-
visit
Visit a Triangle shape- 参数:
triangle
- the triangle to visit
-