The method
Filter connect(final Filter filter) {
...
return filter
}
is in a class
class Pipe
I get the Error "Cannot resolve U". The idea is to just generically return the same filter with the same two types without knowing the U type. How do i do that?
The goal is to be able to chain without providing type parameters, when they are not necessary because they do not get modified:
(new Pipe).connect(new Filter<>(...)).connect(new Pipe<>)...
The second Pipe after the Filter in the above expamle shall implicitly be of the generic type Integer.