public AddressRange forwardNext() {
		
		// Get a next value from each iterator where we don't already have a range.
		for (int i = 0; i < iters.length; i++) {
			if (addrRanges[i] == null) {
				if (((iters[i] != null) && (iters[i].hasNext()))) {
					addrRanges[i] = iters[i].next();
				}
			}
		}
		
		// We don't yet know the next minimum value so get the min of the address ranges.
		if (min == null) {
			for (int i = 0; i < addrRanges.length; i++) {
				if (addrRanges[i] != null) {
					Address checkMinAddr = addrRanges[i].getMinAddress();
					if ((min == null) || (min.compareTo(checkMinAddr) > 0)) {
						min = checkMinAddr;
					}
				}
			}
		}
		
		// Determine the max value for the current range.
		max = null;
		for (int i = 0; i < addrRanges.length; i++) {
			if (addrRanges[i] != null) {
				Address checkMinAddr = addrRanges[i].getMinAddress();
				Address checkMaxAddr = addrRanges[i].getMaxAddress();
				if (addrRanges[i].contains(min)) {
					if ((max == null) || (max.compareTo(checkMaxAddr) > 0)) {
						max = checkMaxAddr;
					}
				}
				else if (min.compareTo(checkMinAddr) < 0) {
					Address previous = checkMinAddr.previous();
					if ((max == null) || (max.compareTo(previous) > 0)) {
						max = previous;
					}
				}
			}
		}
		
		// Save the range to return.
		AddressRange nextRange = new AddressRangeImpl(min, max);
		
		// Determine the next minimum.
		Address nextMin = (max != null) ? max.next() : null;
		
		// Adjust min to be the next minimum and 
		// null out ranges where we need the next range from its iterator.
		min = null;
		for (int i = 0; i < addrRanges.length; i++) {
			if (addrRanges[i] != null) {
				Address checkMaxAddr = addrRanges[i].getMaxAddress();
				if ((nextMin == null) || nextMin.compareTo(checkMaxAddr) > 0){
					addrRanges[i] = null;
				}
				else if (addrRanges[i].contains(nextMin)) {
					if (min == null) {
						min = nextMin;
					}
				}
			}
		}
		
		return nextRange;
	}
Returns the next address for forward iterators. The next address could be from any 
one of the iterators.
@return the next address.
Ghidra/Features/Base/src/main/java/ghidra/program/util/MultiAddressRangeIterator.java