final Iterator<String>[] iterators = new Iterator[runs.size()];
// a heap is used to get every time the smallest under the current elements of the different runs
// (this allows to have logarithmical complexity (concerning the number of runs) for getting the next smallest element)
final Heap<Container> heap = Heap.createInstance(runs.size(), true, Heap.HEAPTYPE.OPTIMIZEDSEQUENTIAL);
for(int i=0; i<runs.size(); i++){
final Run run = runs.get(i);
maxsize += run.size();
iterators[i] = run.iterator();
// assuming the different runs are non-empty!
heap.add(new Container(i, iterators[i].next()));
}
final Iterator<String> iterator = new ImmutableIterator<String>(){