commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajat Sharma" <rsha...@airvana.com>
Subject [Collections] Facing Design Issue
Date Tue, 28 Feb 2006 20:11:00 GMT
Hi,

I have the following strings....which are currently in an arraylist. 

Instance Date		Time	Var-1	Var-2
65793 	02/24/2006 00:00:00 	1 	1 
66049 	02/24/2006 00:00:00 	1 	1 
66305 	02/24/2006 00:00:00 	0 	0 
66561 	02/24/2006 00:00:00 	1 	3 
66817 	02/24/2006 00:00:00 	7 	4 
67073 	02/24/2006 00:00:00 	0 	0 
67329 	02/24/2006 00:00:00 	9 	16 
68353 	02/24/2006 00:00:00 	1 	1 
66817 	02/24/2006 00:02:30 	2 	2 
67073 	02/24/2006 00:02:30 	0 	0 
67329 	02/24/2006 00:02:30	 9 	9 
68353 	02/24/2006 00:02:30 	1	 1 
68609 	02/24/2006 00:02:30	 7 	7 
68865 	02/24/2006 00:02:30 	0 	0 
69121 	02/24/2006 00:02:30 	0 	0 
69377 	02/24/2006 00:02:30 	1 	1 
69633 	02/24/2006 00:02:30 	0	 0 
65793 	02/24/2006 00:03:00 	1 	0 

One thing unique in the above table is the time on a per instance basis. Var-1, and Var-2
are the attributes of the instance at any given time.

What I need is a very clean way to wrap these under collections framework, 

a) Such that all the instances having the same ID are in their own Collections 
b) Most importantly, I could sort them with time. 

So all the unique instances help create separate tables each having the same ID, which can
then be sorted on Date\Time such that sub-lists could be created which fall under the range
of time given.

I am almost a beginner in collections and don't know if this is possible. Please note that,
the above is not simly key-pair values but key-value-value....

Could someone help me.

Regards,
Raj

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message