This is a contrived example, but easier to explain than my actual code:
public interface ContainerOwner<T, C extends Container<T>> {
I would like to avoid repeating T in a signature of this type, because it becomes cumbersome when the parameters themselves have parameters, for example:
ContainerOwner< Optional<Future<Map<String, Integer>>>, List<Optional<Future<Map<String, Integer>>>> > foo;
In this example, it seems to me that the first parameter can be inferred from the second. Is there any trick for this?
source share