On Sun, 06 Feb 2005 09:31:21 +1100, Huy <[EMAIL PROTECTED]> wrote:
Yeah, I hate all that casting stuff you have to do in java when getting things out of collections. Generics thing in java 1.5 might help out with this.
Not really. :-(
It will help for things where every element of the collection are the same type. I did a simple JDK5 iBATIS app, and used strongly typed lists - VERY cool! Using List<Customer> is much nicer than "(Customer)List.get(i)" for everything.
But, for a Map, since all the "properties" in your "domain" objects are not the same type, the Map cannot be typed.
Larry
I try to avoid all this casting by just using Arrays. Its much clearing when you have Customer[] getCustomers() in your DAO.
huy