code: @Deprecated(since="2.0")
      public static <E> Stream<E> gate(Stream<E> stream, Predicate<? super E> validator) {
          Objects.requireNonNull(stream);
          Objects.requireNonNull(validator);
  
          GatingSpliterator<E> spliterator = GatingSpliterator.of(stream.spliterator(), validator);
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close);
      }
docs: <p>Generates a stream that does not generate any element, until the validator becomes true for an element of
  the provided stream. From this point, the returns stream is identical to the provided stream. </p>
  <p>If you are using Java 9, then yo should use <code>Stream.dropWhile(Predicate)</code>. </p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream of the validator predicate is null.</p>
  
  @param stream    the input stream. Will throw a <code>NullPointerException</code> if <code>null</code>.
  @param validator the predicate applied to the elements of the input stream.
  Will throw a <code>NullPointerException</code> if <code>null</code>.
  @param <E>       the type of the stream and the returned stream.
  @return a stream that starts when the validator becomes true.
  @deprecated Java 9 added the
  <a href="https://docs.oracle.com/javase/9/docs/api/java/util/stream/Stream.html#dropWhile-java.util.function.Predicate-">
  Stream.dropWhile(Predicate)</a> that does the same.