visitor模式里的一个bug

03-11-14 yangj
public interface Visitable
{
   public void accept(Visitor visitor);
}
...
public class ConcreteVisitor implements Visitor
{
    ...
    public void visitString(Visitable string) {
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      System.out.println("'"+string.getValue()+"'");
                                   //   ~~~~~~~~~Visible里面没有出现过吧
   } 
}
<p>

banq
2003-11-18 16:23
是的,多谢细心,还好不是一个关键BUG

猜你喜欢