*/
public static <T> MutableDoubleCollection collectDouble(
Iterator<T> iterator,
DoubleFunction<? super T> doubleFunction)
{
MutableDoubleCollection result = new DoubleArrayList();
while (iterator.hasNext())
{
result.add(doubleFunction.doubleValueOf(iterator.next()));
}
return result;
}