private void findNext() {
		while (nextAddr != null && nextCu == null) {
			CodeUnit nextDefined = null;

			if (nextInst == null) {
				nextDefined = nextData;
			}
			else if (nextData == null) {
				nextDefined = nextInst;
			}
			else {
				int c = nextInst.getMinAddress().compareTo(nextData.getMinAddress());
				c = forward ? c : -c;
				nextDefined = (c < 0) ? (CodeUnit) nextInst : (CodeUnit) nextData;
			}
			if (nextDefined != null && !nextDefined.contains(nextAddr)) {
				nextDefined = null;
			}
			if (nextDefined != null) {
				if (nextDefined == nextInst) {
					nextInst = instIt.next();
				}
				else {
					nextData = dataIt.next();
				}
			}
			else {
				nextDefined = codeMgr.getUndefinedAt(nextAddr);
			}
			nextAddr = getNextAddr(nextAddr, nextDefined);
			nextCu = nextDefined;
		}
	}
Constructs a new CodeUnitRecordIterator
@param codeMgr the code manager
@param instIt the instruction iterator
@param dataIt the data iterator
@param set the address set (required)
@param forward the iterator direction
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeUnitRecordIterator.java