code: private static int findGroupEnd(Page page, PagesHashStrategy pagesHashStrategy, int startPosition)
      {
          checkArgument(page.getPositionCount() > 0, "Must have at least one position");
          checkPositionIndex(startPosition, page.getPositionCount(), "startPosition out of bounds");
  
          return findEndPosition(startPosition, page.getPositionCount(), (firstPosition, secondPosition) -> pagesHashStrategy.rowEqualsRow(firstPosition, page, secondPosition, page));
      }
docs: Assumes input grouped on relevant pagesHashStrategy columns