final KijiTableLayout layout = mTable.getLayout();
final Set<KijiColumnName> layoutColumns = layout.getColumnNames();
final Map<KijiColumnName, BoundColumnReaderSpec> boundOverrides = Maps.newHashMap();
for (Map.Entry<KijiColumnName, ColumnReaderSpec> override
: overrides.entrySet()) {
final KijiColumnName column = override.getKey();
if (!layoutColumns.contains(column)
&& !layoutColumns.contains(new KijiColumnName(column.getFamily()))) {
throw new NoSuchColumnException(String.format(
"KijiTableLayout: %s does not contain column: %s", layout, column));
} else {
boundOverrides.put(column,
BoundColumnReaderSpec.create(override.getValue(), column));
}
}
mOverrides = boundOverrides;
final Collection<BoundColumnReaderSpec> boundAlternatives = Sets.newHashSet();
for (Map.Entry<KijiColumnName, ColumnReaderSpec> altsEntry
: alternatives.entries()) {
final KijiColumnName column = altsEntry.getKey();
if (!layoutColumns.contains(column)
&& !layoutColumns.contains(KijiColumnName.create(column.getFamily()))) {
throw new NoSuchColumnException(String.format(
"KijiTableLayout: %s does not contain column: %s", layout, column));
} else {
boundAlternatives.add(
BoundColumnReaderSpec.create(altsEntry.getValue(), altsEntry.getKey()));