package p;

import java.util.*;
import java.util.function.*;
import java.util.stream.*;

public class Stream<T> {

    public Iterator<T> iterator() {
        return null;
    }

    public boolean allMatch(Predicate<? super T> predicate) {
        throw null;
    }

    public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) {
        throw null;
    }

    // Collector is not a functional interface, so this is not supported
    public <R, A> R collect(Collector<? super T, A, R> collector) {
        throw null;
    }

    public static <T> Stream<T> concat(Stream<? extends T> a, Stream<? extends T> b) {
        throw null;
    }

    public Stream<T> distinct() {
        throw null;
    }

    public static <T> Stream<T> empty() {
        throw null;
    }

    public Stream<T> filter(Predicate<? super T> predicate) {
        throw null;
    }

    public Optional<T> findAny() {
        throw null;
    }

    public Optional<T> findFirst() {
        throw null;
    }

    // public <R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends
    // R>> mapper) {
    // throw null;
    // }

    public DoubleStream flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper) {
        throw null;
    }

    public IntStream flatMapToInt(Function<? super T, ? extends IntStream> mapper) {
        throw null;
    }

    public LongStream flatMapToLong(Function<? super T, ? extends LongStream> mapper) {
        throw null;
    }

    public void forEach(Consumer<? super T> action) {
        throw null;
    }

    public void forEachOrdered(Consumer<? super T> action) {
        throw null;
    }

    // Issue with model generator. Return value is not correctly identified as a
    // collection like type.
    // public static <T> Stream<T> generate(Supplier<T> s) {
    // throw null;
    // }

    // Issue with model generator. Return value is not correctly identified as a
    // collection like type.
    // public static <T> Stream<T> iterate(T seed, UnaryOperator<T> f) {
    // throw null;
    // }

    public Stream<T> limit(long maxSize) {
        throw null;
    }

    // Issue with model generator. Return value is not correctly identified as a
    // collection like type and also the type parameter is not correctly identified.
    // public <R> Stream<R> map(Function<? super T, ? extends R> mapper) {
    // throw null;
    // }

    public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper) {
        throw null;
    }

    public IntStream mapToInt(ToIntFunction<? super T> mapper) {
        throw null;
    }

    public LongStream mapToLong(ToLongFunction<? super T> mapper) {
        throw null;
    }

    public Optional<T> max(Comparator<? super T> comparator) {
        throw null;
    }

    public Optional<T> min(Comparator<? super T> comparator) {
        throw null;
    }

    public boolean noneMatch(Predicate<? super T> predicate) {
        throw null;
    }

    // Issue with model generator. ... is not supported.
    // public static <T> Stream<T> of(T... t) {
    // throw null;
    // }

    // Issue with model generator. Return value is not correctly identified as a
    // collection like type and also the type parameter is not correctly identified.
    // public static <T> Stream<T> of(T t) {
    // throw null;
    // }

    public Stream<T> peek(Consumer<? super T> action) {
        throw null;
    }

    // Model generator yields a couple of extra results as models are generated for
    // writing to the stream.
    public Optional<T> reduce(BinaryOperator<T> accumulator) {
        throw null;
    }

    // Model generator yields a couple of extra results as models are generated for
    // writing to the stream.
    public T reduce(T identity, BinaryOperator<T> accumulator) {
        throw null;
    }

    public <U> U reduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) {
        throw null;
    }

    public Stream<T> skip(long n) {
        throw null;
    }

    public Stream<T> sorted() {
        throw null;
    }

    public Stream<T> sorted(Comparator<? super T> comparator) {
        throw null;
    }

    // Models can never be generated correctly based on the type information
    // as it involves downcasting.
    public Object[] toArray() {
        throw null;
    }

    // Issue with model generator - no models are generated.
    // public <A> A[] toArray(IntFunction<A[]> generator) {
    // throw null;
    // }
}
@@ -1686,121 +1686,8 @@
 %0A   
- // Issue with model generator. Return value is not correctly identified as a%0A    // collection like type.%0A    //
  pub
@@ -1733,34 +1733,35 @@
 ier%3CT%3E s) %7B%0A    
-//
+   
  throw null;%0A   
@@ -1752,35 +1752,32 @@
  throw null;%0A   
- //
  %7D%0A%0A    // Issue
@@ -1767,36 +1767,25 @@
   %7D%0A%0A    // 
-Issue with m
+M
 odel generat
@@ -1790,91 +1790,106 @@
 ator
-. Return value is not correctly identified as a%0A    // collection like type
+ adds a couple of extra models, which can't be%0A    // dismissed based on the type information
 .%0A   
- //
  pub
@@ -1947,34 +1947,35 @@
 tor%3CT%3E f) %7B%0A    
+  
-//
+ 
  throw null;%0A   
@@ -1966,35 +1966,32 @@
  throw null;%0A   
- //
  %7D%0A%0A    public S
@@ -2055,177 +2055,8 @@
 %0A   
- // Issue with model generator. Return value is not correctly identified as a%0A    // collection like type and also the type parameter is not correctly identified.%0A    //
  pub
@@ -2116,34 +2116,35 @@
 %3E mapper) %7B%0A    
-//
+   
  throw null;%0A   
@@ -2135,35 +2135,32 @@
  throw null;%0A   
- //
  %7D%0A%0A    public D
@@ -2846,177 +2846,8 @@
 %0A   
- // Issue with model generator. Return value is not correctly identified as a%0A    // collection like type and also the type parameter is not correctly identified.%0A    //
  pub
@@ -2877,34 +2877,35 @@
 %3E of(T t) %7B%0A    
-//
+   
  throw null;%0A   
@@ -2896,35 +2896,32 @@
  throw null;%0A   
- //
  %7D%0A%0A    public S

Add further examples that are now supported.