click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm Edgar <malcolm.ed...@gmail.com>
Subject Re: Generics question
Date Tue, 09 Nov 2010 09:36:32 GMT
Hi Bob,

yes that is correct.

regards Malcolm Edgar

On Tue, Nov 9, 2010 at 6:47 PM, Bob Schellink <sabob1@gmail.com> wrote:

> Hope someone here knows here has an answer. :)
>
> LinkDecorator has the following constructor:
>
>  public LinkDecorator(Table table, List<AbstractControl> controls, String
> idProperty)
>
> The following statement gives compiler error:
>
>  List<AbstractLink> linksList = new ArrayList<AbstractLink>();
>  LinkDecorator dec = new LinkDecorator(table, linksList, "id");
>
> since the generic linksList is not compatible.
>
> To make that a valid statement is the fix to change the constructort as
> follows?:
>
>  public LinkDecorator(Table table, List<? extends AbstractControl>
> controls, String idProperty)
>
> Kind regards
>
> Bob
>

Mime
View raw message