title: Java 8 predicate validator implementation
body: <p>I read this (article|<a href="https://dzone.com/articles/fail-fast-validations-using" rel="nofollow noreferrer">https://dzone.com/articles/fail-fast-validations-using</a>) about Java validator implementation.</p>
  
  <pre><code>import java.util.LinkedList;
  import java.util.List;
  import java.util.function.Predicate;
  
  public class GenericValidator&lt;T&gt; implements Predicate {
  
    private final List&lt;Predicate&lt;T&gt;&gt; validators = new LinkedList&lt;&gt;();
  
    public GenericValidator(List&lt;Predicate&lt;T&gt;&gt; validators) {
      this.validators.addAll(validators);
    }
  
    @Override
    public boolean test(final T toValidate) {
      return validators.parallelStream()
                   .allMatch(predicate -&gt; predicate.test(toValidate));
    }
  }
  </code></pre>
  
  <p>Isn't this call to test a recursive call? say, predicate.test is called inside test function implements Predicate  </p>