I have 2 different types of data managers, one inherits the other and both rely on 1 base data class and looks like this:
public abstract class BaseDataType {
...
}
public class BaseManager<DataType extends BaseDataType> implements ListModel{
...
public final DataType get(index i){
return dataList.get(i);
}
...
}
public class BaseSQLManager<DataType extends BaseDataType, Adapter extends SQLAdapter>
extends BaseManager<DataType>{
...
}
My understanding that using BaseSQLManager m =new BaseSQLManager<Property, PropertSQLAdapter>(); would allow me to use Property p = m.get(i); however I am informed that the get method returns BaseDataType.
I'm sure I'm missing something small here and I can't figure it out. An explanation of why this doesn't work would really help. Thanks