@Override
		public boolean hasNext() throws IOException {
			synchronized (db) {
				if (modCount != expectedModCount) {
					reset();
				}
				if (!hasNext) {

					if (bufferId < 0 || keyIndex < 0) {
						return false;
					}

					// Check next key index
					int nextIndex = keyIndex + 1;

					try {
						// Process next leaf if needed
						FieldKeyRecordNode leaf = (FieldKeyRecordNode) getFieldKeyNode(bufferId);
						if (nextIndex >= leaf.getKeyCount()) {
							leaf = leaf.getNextLeaf();
							if (leaf == null) {
								return false;
							}
							Field nextKey = leaf.getKeyField(0);
							if (maxKey != null && nextKey.compareTo(maxKey) > 0) {
								return false;
							}
							bufferId = leaf.getBufferId();
							key = nextKey;
							keyIndex = 0;
							hasNext = true;
							hasPrev = false;
						}

						// else, use keys cache
						else {
							Field nextKey = leaf.getKeyField(nextIndex);
							hasNext = maxKey == null ? true : (nextKey.compareTo(maxKey) <= 0);
							if (hasNext) {
								key = nextKey;
								keyIndex = nextIndex;
								hasPrev = false;
							}
						}
					}
					finally {
						nodeMgr.releaseNodes();
					}
				}
				return hasNext;
			}
		}
Reset iterator (requires DBHandle lock)
@throws IOException if IO error occurs
Ghidra/Framework/DB/src/main/java/db/Table.java