Ejemplo 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);
       };
 }
Ejemplo n.º 2
0
 public <R, A, T extends GenericVisitor<R, A>> void addGenericListener(
     Filter2<Object, T, A> filter, In3Out1<T, Node, A, R> listener) {
   final GenericFactory was = genericFactory;
   genericFactory =
       (vis, arg) -> {
         if (filter.filter(vis, arg)) {
           return (In3Out1) listener;
         }
         return was.io(vis, arg);
       };
 }