473,385 Members | 1,375 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,385 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 1069
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.