On Sun, 22 Feb 2009, Jeremy Thomerson wrote:
> I've been meaning to ask on the dev list why that is.  Being forced to
> declare the "? extends User" for a model like yours seems to add complexity,
> and force a local variable.  I haven't looked at it that much, but I know
> that every time I've had to declare one, I always think "that's weird".

Then you can have a collection of subclass objects as well, 
e.g. this does not compile

  List<Serializable> foo = new ArrayList<String>();

but this does

  List<? extends Serializable> bar = new ArrayList<String>();

You don't really miss the "? extends" thing until you need 
it :) E.g. you have user dropdown that shows Users and then 
you want to use it to list objcets of Admin extends User.

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to