예제 #1
0
 @Override
 public void removeVisitor(Visitor visitor) {
   super.removeVisitor(visitor);
   if (visitor instanceof ReducedGraphVisitor) {
     visitors.remove(visitor);
   }
 }
예제 #2
0
 @Override
 public void addVisitor(Visitor visitor) {
   if (visitor instanceof ReducedGraphVisitor) {
     super.addVisitor(visitor);
     visitors.add((ReducedGraphVisitor) visitor);
   } else {
     throw new IllegalArgumentException(
         "This visitor composition is only compatible with implementations of "
             + ReducedGraphVisitor.class.getSimpleName()
             + ".");
   }
 }
예제 #3
0
 @Override
 public void clearVisitors() {
   super.clearVisitors();
   visitors.clear();
 }