public MergeIterators(Comparator<E> comp, Iterator<E>[] itList,
			E[] nextContainer) {
		if (itList == null)
			throw new IllegalArgumentException("Null array of iterators");
		if (comp == null)
			throw new IllegalArgumentException("Null comparator");
		if (nextContainer == null)
			throw new IllegalArgumentException("Null next container");
		if (itList.length != nextContainer.length)
			throw new IllegalArgumentException(
					"Iterator array and next container must have the same size");

		this.comp = comp;
		this.itList = itList;
		this.nextList = nextContainer;

		for (int i = 0; i < itList.length; i++) {
			Iterator<E> it = itList[i];
			if (it.hasNext()) {
				nextList[i] = it.next();
			} else {
				nextList[i] = null;
			}
		}
		advance();
	}