public void add(int value) {
        if (result.size() > 0 && result.getValue((int)result.size() - 1) == value) {
            resultGroups.get(resultGroups.size() - 1).maxIteration++;
        } else {
            resultGroups.add(new ResultGroup((int)result.size(), (int)result.size()));
        }

        result.add(value);
        fireTableRowsInserted(resultGroups.size() - 1, resultGroups.size() - 1);
    }