code: public static <W extends Collection<T>, T> Iterator<W> window(int windowSize, Iterable<T> iterable, Supplier<W> supplier) {
          dbc.precondition(iterable != null, "cannot create a window iterator from a null iterable");
          return new PreciseWindowIterator<W, T>(iterable.iterator(), windowSize, supplier);
      }
docs: Adapts an iterable to an iterator showing a sliding window of the
  contained elements. e.g: iterable: [1,2,3] windowSize: 2 -> [[1,2],
  [2,3]]
  
  @param <W> the window type
  @param <T> the iterator element type
  @param windowSize the window size
  @param iterable the iterable to be adapted
  @param supplier the supplier providing the window collection
  @return the window iterator