I have a class like this:
public class MyClass<T>{
private MyTape data;
private List<T> someOtherdata;
}
I’m trying to write a generic service in Android usign Spring for Android RestTemplate, but this give a type mismatch:
ResponseEntity<MyClass<? extends Parcelable>> test = new ResponseEntity<MyClass<MyOtherType>>(..);
Where MyOtherType implements Parcelable.
In there a way around this? My other solution is to use “less generic code” and subclass MyClass
Use
instead of