473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Collecting Groups of [3 Objects]

What are some reasonable options for storing collections of [3 related
object variables]. I see that there are plenty of options for storing
collections of individual items (e.g., string or int array) or for
name/value pairs (e.g., hash table). But I have a need to create some sort
of a collection that lets me collect groups of 3 object variables, like
this:

object_1a object_1b object_1c
object_2a object_2b object_2c
object_3a object_3b object_3c
object_4a object_4b object_4c
etc...

Each of these will be for instances of the MVP pattern - so for example
object_1a would be a Model instance, object_1b would be the associated
Presenter and object_1c would be the associated View object (custom Form).

Code then encapsulates this collection would need to be able to search this
collection for a specific Model instance and then be able to return its
associated Presenter or View.

Thanks for your time and consideration.

-Jeff
Feb 17 '06 #1
1 1070
If it were me, I would probably create a struct with an Array in it to
store object_1a, object_1b etc...

then add the structs to another arraylist, so then when you access one
struct, you get the object refs from the arraylist within the struct

Feb 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Robert Potthast | last post by:
Hi! I am trying to implement a safe garbage collecting system. I use reference counting combined with smart pointers and a garbage collector which keeps a list of all heap-allocated objects. Now I...
3
by: CSharpX | last post by:
Hello, can someone please give me a tip or two on the following problem: I have a system of linked objects which stores properties of on-screen drawn objects. When i select each object on the...
1
by: j.eckles | last post by:
I'm trying to determine if there is a way in VBScript, perhaps via ADO or DAO, to access what I'll term MS Access "object groups". What I mean by "object groups" are the folders that you see under...
17
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.