code: @Deprecated(since="2.0")
      public static <E> Stream<E> interrupt(Stream<E> stream, Predicate<? super E> interruptor) {
          Objects.requireNonNull(stream);
          Objects.requireNonNull(interruptor);
  
          InterruptingSpliterator<E> spliterator = InterruptingSpliterator.of(stream.spliterator(), interruptor);
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close);
      }
docs: <p>Generates a stream identical to the provided stream until the interruptor predicate is false for one element.
  At that time, the returned stream stops. </p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream of the interruptor predicate is null.</p>
  <p>If you are using Java 9, then yo should use <code>Stream.takeWhile(Predicate)</code>. </p>
  
  @param stream      the input stream. Will throw a <code>NullPointerException</code> if <code>null</code>.
  @param interruptor 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 is a copy of the input stream, until the interruptor becomes false.
  @deprecated Java 9 added the
  <a href="https://docs.oracle.com/javase/9/docs/api/java/util/stream/Stream.html#takeWhile-java.util.function.Predicate-">
  Stream.takeWhile(Predicate)</a> method that does the same.