Exemplo n.º 1
0
 public <A, T extends VoidVisitor<A>> void addVoidListener(
     Filter2<Object, T, A> filter, In3<T, Node, A> listener) {
   final VoidFactory was = voidFactory;
   voidFactory =
       (vis, arg) -> {
         if (filter.filter(vis, arg)) {
           return (In3) listener;
         }
         return was.io(vis, arg);
       };
 }
Exemplo n.º 2
0
 public <A, Vis extends VoidVisitor<A>> In3<Vis, Node, A> voidVisit(Vis vis, A arg) {
   final In3 factory = voidFactory.io(vis, arg);
   return (v, n, a) -> {
     try (Do undo = universalListener.io(n, a)) {
       factory.in(v, n, a);
     }
   };
 }