Den 11.07.2011 15:08, skrev Greg Brown:
If you parameterize the class, I don't think that causes any problems when you
declare an instance without a type argument, does it?
Yes, you get a raw type warning.
OK, but then you could declare it with<Object> or<YourType> and the warning
would go away. The warning would be absolutely justified, and your data is of a certain
type, so this seems like the perfect place to use a generic type argument, doesn't it? :)
Sure, but I don't want to have to parameterize my ListView. For the most part,
ListView doesn't care about the data type. That's up to the model (which is
already parameterized).
OK. Out of curiosity, how to you write your code when you want to call
listView.getTableData().add(yourObject)?
-- Edvin