I need a recommendation for a good implementation of merge sort in Java. 
Basically, I can write all the merges but if I would have a good jar from a provider such as Apache or Google it would be nicer. 

Requirements for the merge sort:

1. I get an unknown number of sorted arrays.
2. Very important: I get a number that says when to stop (lets say it says 34 on a random incident - I want my algorithm to stop sorting when it reaches that number).

No need to write the code here, I'm only looking for an available jar/library.