code: public static <E> Stream<E> cycle(Stream<E> stream) {
          Objects.requireNonNull(stream);
  
          CyclingSpliterator<E> spliterator = CyclingSpliterator.of(stream.spliterator());
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close).flatMap(identity());
      }
docs: <p>Generates a stream by repeating the elements of the provided stream forever. This stream is not bounded. </p>
  <pre>{@code
  Stream<String> stream = Stream.of("tick", "tock");
  Stream<String> cyclingStream = StreamsUtils.cycle(stream);
  List<String> collect = cyclingStream.limit(9).collect(Collectors.toList());
  // The collect list is ["tick", "tock", "tick", "tock", "tick", "tock", "tick", "tock", "tick"]
  }</pre>
  <p>The returned spliterator is <code>ORDERED</code>.</p>
  
  @param stream The stream to cycle on. Will throw a <code>NullPointerException</code> if <code>null</code>.
  @param <E>    The type of the elements of the provided stream.
  @return A cycling stream.