In Android I can put only
Parcelable objects in
Intent putParcelableArrayListExtra(String name, ArrayList<? extends Parcelable> value);
I can't put in there a
List<? extends Parcelable>.
I have private method that get list of
Parcelable objects from
Intent (i.e. the method is used in its own class).
As I said there is always
Intent. Should I declare return type of this method as
I think that
ArrayList would be better because an
ArrayList is also a
List. But I often read that I should declare field type as most general possible type. I.e.,
List<> if I need ordered collection) instead of
ArrayList<>. But I don't see any reason to do so for this method return type.