private long findNextValue(int afterRow) {
		if (enumEntryList.isEmpty()) {
			return 0;
		}
		if (afterRow < 0 || afterRow >= enumEntryList.size()) {
			afterRow = 0;
		}
		long value = enumEntryList.get(afterRow).getValue() + 1;
		if (!isValidValue(value)) {
			value = 0;
		}
		boolean wrapOK = value != 0;
		while (enuum.getName(value) != null) {
			if (!isValidValue(++value)) {
				if (wrapOK) {
					value = 0;
					wrapOK = false;
				}
				else {
					break;
				}
			}
		}
		return value;
	}
Model for the enum editor table.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/editor/EnumTableModel.java