Returns sliding windows of the given size over the list.
Example:
// list = ["a", "b", "c", "d"]
var windows = Lists.slidingString (list, 2);
// [["a","b"], ["b","c"], ["c","d"]]
| list |
the source list. |
| windowSize |
the window size (must be > 0, otherwise empty result). |
|
an ArrayList of window lists. |