• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data structure similar to Data base views?  RSS feed

 
Sundar Ram
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there a data structure similar to database view? I have a list containing thousands of data, and I want to get a sublist matching the conditions which I specify(It is multiple conditions which I want to specify).

Any help is higly appreciated.

Thanks in advance.

~ Sundar ~
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't think of anything analogous at the moment. But remember SQL isn't an imperative language; you can say CREATE VIEW and SQL knows what to do. It is done by the database management system (DBMS) program. In an imperative language (eg Java) you would have to tell the program how to do it.

I think you are going to have to create a new List (maybe a local variable) and iterate your big List and add compliant elements to the new List.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!