if (index + length > list.size())
throw new IllegalArgumentException(
"Illegal index or length: sum of the index and the length cannot be greater than the list size");
UIFormInputSet result[] = new UIFormInputSet[length];
for (int i = 0; i < length; i++)
result[i] = list.get(i + index);
return result;
}