ShortFunction<? super T> shortFunction)
{
int size = list.size();
if (ArrayListIterate.isOptimizableArrayList(list, size))
{
MutableShortList result = new ShortArrayList(size);
return ArrayListIterate.collectShortFromInternalArray(list, shortFunction, size, result);
}
return RandomAccessListIterate.collectShort(list, shortFunction);
}