click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <sab...@gmail.com>
Subject Generics question
Date Tue, 09 Nov 2010 07:47:38 GMT
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