摘要: 组合模式,访问者模式 的实际运用, DeptNode 是部门结点,如Test类,组成了一个部门的结点。注意一点是:在DeptNode 中新增了 accept的方法 来接收DeptNodeVisitor的访问。 创建一个DeptNodeVisitor 部门树访问者接口,定义方法visitor。 我们d 阅读全文
posted @ 2021-10-25 13:39 白日梦丶 阅读(143) 评论(0) 推荐(0)