[COLLECTIONS-675] Modify IteratorUtils.peekingIterator signature to

return PeekingIterator.
This commit is contained in:
Gary Gregory 2018-02-22 14:45:21 -07:00
parent 2dd7c4ad8e
commit 96eddd6ae1
2 changed files with 918 additions and 914 deletions

File diff suppressed because it is too large Load Diff

View File

@ -856,8 +856,9 @@ public class IteratorUtils {
* @return a peeking iterator
* @throws NullPointerException if the iterator is null
* @since 4.0
* @since 4.2 returns a {@link PeekingIterator} instead of a {@link Iterator}.
*/
public static <E> Iterator<E> peekingIterator(final Iterator<? extends E> iterator) {
public static <E> PeekingIterator<E> peekingIterator(final Iterator<? extends E> iterator) {
return PeekingIterator.peekingIterator(iterator);
}