How to infer a generic type parameter from another in Java?
I’m using a class that uses two generic type parameters in Java, but I find the second type parameter to be redundant because it is already determined by the first.
Why can’t java infer this type parameter?
When I run the following code