Convert the iterator into a list. After this conversion the
iterator is empty and hasNext() will always return false.
Note: This method should be used with care. For example a large database
result is pulled into memory completely with this method and can cause
an OutOfMemory situation.
Converts a sub-sequence within the iterator into a list.
Note: This method should be used with care. For example a large database
result is pulled into memory completely with this method and can cause
an OutOfMemory situation.
Parameters:
start - the number of elements to iterate before adding elements to the sublist. Negative values are treated as 0.
size - the maximum number of elements to add to the sublist. Nonpositive values always result in empty list.