{
Object block;
block = readBlock(mNominalValuesInput); // BEGIN outer list of nominal values
if (block != ControlBlock.LIST_BEGIN)
{
throw new ActivityUserException(
new MalformedListBeginException(INPUT_NOMINAL_VALUES));
}
block = readBlock(mColumnInput); // BEGIN outer list of column indices
if (block != ControlBlock.LIST_BEGIN)
{
throw new ActivityUserException(
new MalformedListBeginException(INPUT_COLUMN_INDICES));
}
Map<Integer, List<Object>> result = new HashMap<Integer, List<Object>>();
while ((block = readBlock(mNominalValuesInput)) != ControlBlock.LIST_END)
{
if (block != ControlBlock.LIST_BEGIN)
{
throw new ActivityUserException(
new MalformedListBeginException(INPUT_NOMINAL_VALUES));
}
int index = getNextColumnIndex();
List<Object> values = new ArrayList<Object>();
while ((block = readBlock(mNominalValuesInput)) != ControlBlock.LIST_END)
{
if (block == ControlBlock.NO_MORE_DATA)
{
throw new ActivityUserException(
new MalformedListEndException(INPUT_NOMINAL_VALUES));
}
else
{
values.add(block);
}
}
result.put(index, values);
}
block = readBlock(mColumnInput); // END outer list of column indices
if (block != ControlBlock.LIST_END)
{
throw new ActivityUserException(
new MalformedListEndException(INPUT_COLUMN_INDICES));
}
return result;
}