int columnsCount = data.getInputsCount() + data.getOutputsCount();
if (min < 0)
{
throw new WrongMetadataException(Localizer.getString(StringId.MIN_COLUMN_INDEX) + " < 0.");
}
if (max >= columnsCount)
{
throw new WrongMetadataException(
"" + max + " >= " + columnsCount + Localizer.getString(StringId.MAX_COLUMN_INDEX));
}
Set<Integer> indexes = new TreeSet<Integer>();
{
for (ColumnInfo column : columns)
{
int index = column.getIndex();
if (indexes.contains(index))
{
throw new WrongMetadataException(
Localizer.getString(StringId.COLUMN_INDEX_IS_NOT_UNIQUE, index));
}
indexes.add(index);
}