3 ms·
I’d just solve this by passing in a Class<S extends Iterable<R>> arg and making the returned list be an instance of this class, instead of forcing the input col
by zeroimpl 6y ago
I’d just solve this by passing in a Class<S extends Iterable<R>> arg and making the returned list be an instance of this class, instead of forcing the input collection type to be the same as the output collection type.
- mrkeen 6y agoThen I can't chain method calls. foo.doSomething() // returns Iterable. .doSomethingElse(); // Iterable doesn't implement doSomethingElse();