class RowPriorityResolver {

    public void set(final int rowNumber,
                    final int priorityOver) {

        final RowNumber rowNumberObject = new RowNumber(rowNumber);
        rowOrder.add(rowNumberObject);

        if (rowNumber < priorityOver) {
            throw new IllegalArgumentException("Priority over lower priority rows is not supported.");
        }

        if (priorityOver != 0) {
            overs.put(rowNumberObject,
                      new Over(priorityOver));
        }
    }

}