Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. public class BaseFilterableArrayAdapter<T> extends ArrayAdapter< IFilterableEntity<T> > implements SectionIndexer
  2. {
  3.  
  4.  
  5. public BaseFilterableArrayAdapter(Activity context,int id_row_template, List<IFilterableEntity<T>> data)
  6. {
  7. super(context, id_row_template, data);
  8. }
  9.  
  10. public MyAdapter(Activity context, List<MyEntity> data)
  11. {
  12. super(context, R.layout.listview_row, data);
  13. ....
  14. }
  15.  
  16. The constructor `BaseFilterableArrayAdapter<String>(Activity, int, List<MyEntity>)` is undefined
  17.  
  18. public class BaseFilterableArrayAdapter<T> extends ArrayAdapter<T>
  19. implements SectionIndexer{
  20.  
  21. public BaseFilterableArrayAdapter(Activity context, int idRowTemplate, List<T> data) {
  22. super(context, idRowTemplate, data);
  23. ...
  24. }
  25. }
  26.  
  27. import java.awt.List;
  28. import java.util.ArrayList;
  29.  
  30. class Animal {
  31.  
  32. }
  33.  
  34. class Cat extends Animal {
  35.  
  36. }
  37.  
  38. public class TemplatedList {
  39. public static void main(String[] args) {
  40. ArrayList<Animal> animals = new ArrayList<Cat>();
  41. }
  42. }
  43.  
  44. Exception in thread "main" java.lang.Error: Unresolved compilation problem:
  45. Type mismatch: cannot convert from ArrayList<Cat> to ArrayList<Animal>
  46.  
  47. at TemplatedList.main(TemplatedList.java:14)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement