package com.github.moreaunicolas.util.stream;

import com.github.moreaunicolas.util.EnumerationAsIterator;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

public class ExtendedStreamSupport {

    public static <T> Stream<T> stream(Iterable<T> objects) {
        return StreamSupport.stream(objects.spliterator(), false);
    }

    public static <T> Stream<T> stream(Iterator<T> iterator) {
        Spliterator<T> spliterator = Spliterators.spliteratorUnknownSize(iterator, 0);
        return StreamSupport.stream(spliterator, false);
    }

    public static <T> Stream<T> stream(Enumeration<T> enumeration) {
        return stream(new EnumerationAsIterator<>(enumeration));
    }
}

@@ -818,11 +818,107 @@
 );%0A    %7D
+%0A%0A    private ExtendedStreamSupport() %7B%0A        throw new UnsupportedOperationException();%0A    %7D
 %0A%7D%0A

Add private throwing constructor to ExtendedStreamSupport