Improved multi Proxy DNSLocator based
[aaf/authz.git] / auth / auth-batch / src / main / java / org / onap / aaf / auth / batch / helpers / Visitor.java
index a59064e..38a7647 100644 (file)
 package org.onap.aaf.auth.batch.helpers;
 
 public interface Visitor<T> {
-       void visit(T t);
+    void visit(T t);
+    
+    public static class Multi<T> implements Visitor<T> {
+        private final Visitor<T>[] visitors;
+        @SafeVarargs
+        public Multi(Visitor<T> ... vs) {
+            visitors  = vs;
+        }
+        
+        @Override
+        public void visit(T t) {
+            for(Visitor<T> v : visitors) {
+                v.visit(t);
+            }
+        }
+    };
 }