|
|
OK, I've been struggling with this for a bit now.
How to properly implement custom collections in JAVA.
I've been programming in VB Net for years and have been using Implements
CollectionBase for quite a while
I have read so much documentation that my eyes almost fell out, but have
made very little progress.
I have tried extending AbstractList, but I cannot figure out how to
override the 'add' method properly.
My basic
ACompany
int ID
String Name
CompanyTypeCollection Types
ACompanyType
int ID
String Type
CompanyTypeCollection
a collection of ACompanyType
dynamic with add and remove methods
I would like to be able to iterate over ACompany.Types with something like:
for each thisCompanyType as AComapnyType in thisCompany.Types
I am after suggestions and recommendations for proper implementation of
custom object collections such as this.
And yes, I have read the collections section in the JAVA documentation :-)
Can someone help me... please .....
Thanks,
Tom
Post a reply to this message
|
|