List<? extends List<? extends ObservationInteger>>
Just to give you a background which probably has nothing to do with the question. Trying to use the JAHMM library to build and score HMM's.
One of the parameters to the functions mentions the above as the datatype and I have no idea what it means.
From what I understand with help from a friend List<? extends ObservationInteger>
means a List of instances of any classes extending "ObservationInteger" which is a valid class in the library.
It is the outer List<? extends List<?...
that is confusing me.
Can someone throw some light on this?
List<? extends List...
means that it can be List of any Collections implementing List interface.
List<List<? extends ObservationInteger>> list = new ArrayList<List<ObservationInteger>>();
- compiler error because without ? extends
compiler requires exact match:
List<List<? ObservationInteger>> list = new ArrayList<List<? extends ObservationInteger>>();
- OK
but this looks better
List<? extends List<? ObservationInteger>> list = new ArrayList<List<ObservationInteger>>();
- OK
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments