POV-Ray : Newsgroups : povray.off-topic : Java Collections Server Time
1 Nov 2024 17:21:43 EDT (-0400)
  Java Collections (Message 1 to 1 of 1)  
From: Tom Austin
Subject: Java Collections
Date: 9 Jun 2011 08:48:28
Message: <4df0c11c$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.