pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Question about generics in some classes
Date Wed, 23 Jun 2010 00:25:08 GMT
> Is there a particular reason why TableView doesn’t support generics? 

> public <T> T getSelectedRow(Class<T> requiredClass) {
> }

It is certainly doable, but is this:

  Foo foo = tableView.getSelectedRow(Foo.class);

significantly better than this:

  Foo foo = (Foo)tableView.getSelectedRow();

The other signature might be worth considering - need to give some thought to potential downsides.

> Also with query parameters, this is not a big deal, but including shortcut methods as
follows can be helpful:
> putParameter(String key, int value);
> putParameter(String key, double value);
> putParameter(String key, boolean value);
> putParameter(String key, Object value);

Seems reasonable. However, if we were to add these, I think it might be clearer to add them
to QueryDictionary as put() overloads.


Mime
View raw message