Streams employ the CRTP (Curiously Recurring Template Pattern).
For instance:
1 2 3 4 5 6 |
public interface BaseStream<T, S extends BaseStream<T, S>> where: the type of the stream elements <s> the type of of the stream implementing {@code BaseStream} public interface Stream extends BaseStream<T, Stream> public interface IntStream extends BaseStream<Integer, IntStream> </s> |