public Address next() {
		// Get a next value from each iterator
		for (int i = 0; i < iters.length; i++) {
			if (addrs[i] == null) {
				if (((iters[i] != null) && (iters[i].hasNext()))) {
					addrs[i] = iters[i].next();
				}
			}
		}

		// Find next address.
		Address addrNext = null;
		boolean next[] = new boolean[iters.length];
		for (int i = 0; i < iters.length; i++) {
			if (addrs[i] == null) {
				continue;
			}
			if (addrNext == null) {
				addrNext = addrs[i];
				next[i] = true;
			}
			else {
				int result = addrNext.compareTo(addrs[i]);
				if (result == 0) {
					next[i] = true;
				}
				else if ((forward && (result > 0)) || (!forward && (result < 0))) {
					addrNext = addrs[i];
					for (int n = 0; n < i; n++) {
						next[n] = false;
					}
					next[i] = true;
				}
			}
		}

		// Return next address or null if none.
		for (int i = 0; i < iters.length; i++) {
			if (next[i]) {
				addrs[i] = null;
			}
		}
		return addrNext;
	}
Returns the next address. The next address could be from any 
one of the iterators.
@return the next address.
Ghidra/Features/Base/src/main/java/ghidra/program/util/MultiAddressIterator.java