// Simple Fixed Window Gatherer var strings = List.of("one", "two", "three", "four", "five"); Gatherer> fixedWindow = Gatherers.windowFixed(2); var result = strings.stream() .gather(fixedWindow) .toList(); System.out.println("result = " + result);