• Post Reply Bookmark Topic Watch Topic
  • New Topic

Splitting array list in multiple arrays list  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an arraylist of around 90 test cases. I want to divide these test cases in 3 or more different array list which I want to pass as parameters to different methods.

GetTestCases.listTestCases.size() = 90

Has anyone implemented anything of this sort ?
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PayalG Gupta wrote:I have an arraylist of around 90 test cases. I want to divide these test cases in 3 or more different array list which I want to pass as parameters to different methods.
...
Has anyone implemented anything of this sort ?

Sure, but how to go about it will depend very much on what you want.

If the List is fixed at the time of choice (ie, it won't be modified any further), then you could possibly sort it and use sublists; otherwise all you need is to know how to select the test cases for each of your subdivisions.

Winston
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!