Le 14/08/2013 17:39, Adrian Crum a écrit :
Instead of
int columnInt = record.getValueAsInt(1);
the developer would use
Integer columnInt = Util.convertTo(record.getValue(1), Integer.class);
+1 for the static method, that would allow the use of a static import
and a very concise syntax like:
Integer columnInt = to(Integer.class, record.getValue(1));
That being said, [convert] could offer several patterns to perform type
conversion, and the use of proxies could be one of them.
Emmanuel Bourg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org