class TableLineBuilder {

    public <C extends Enum<C>, R extends Enum<R>> TableLineBuilder withTableEnumCount(
            String statName,
            Table<R, C, Integer> countTable,
            Class<R> rowClass,
            Class<C> columnClass) {
        for (R enumRowValue : rowClass.getEnumConstants()) {
            for (C enumColumnValue : columnClass.getEnumConstants()) {
                withInt(
                        String.format("%s_%s_%s", enumColumnValue, enumRowValue, statName),
                        TableUtils.getOrDefault(countTable, enumRowValue, enumColumnValue, 0));
            }
        }
        return this;
    }

}