接口 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.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    visit(Circle circle)
    Visit a Circle shape
    void
    visit(Line line)
    Visit a Line shape
    void
    visit(Rectangle rectangle)
    Visit a Rectangle shape
    void
    visit(Triangle triangle)
    Visit a Triangle shape
  • 方法详细资料

    • visit

      void visit(Circle circle)
      Visit a Circle shape
      参数:
      circle - the circle to visit
    • visit

      void visit(Rectangle rectangle)
      Visit a Rectangle shape
      参数:
      rectangle - the rectangle to visit
    • visit

      void visit(Line line)
      Visit a Line shape
      参数:
      line - the line to visit
    • visit

      void visit(Triangle triangle)
      Visit a Triangle shape
      参数:
      triangle - the triangle to visit