具体元素的接口与实现类
public interface Person {
void accept(Visitor visitor);
}
public void accept(Visitor visitor) {
visitor.visit(this);
}
具体元素的接口与实现类
public interface Person {
void accept(Visitor visitor);
}
public void accept(Visitor visitor) {
visitor.visit(this);
}