code: public void forEach(@NotNull final Consumer<? super T> action) {
          while (iterator.hasNext()) {
              action.accept(iterator.next());
          }
      }
docs: Performs the given action on each element.
  
  <p>This is a terminal operation.
  
  @param action  the action to be performed on each element