@Override
	public String[] getNames() {
		lock.acquire();
		try {
			checkIsValid();
			initializeIfNeeded();

			// names are first sorted by int value, then sub-sorted by name value
			List<String> names = new ArrayList<>();
			Collection<List<String>> values = valueMap.values();
			for (List<String> list : values) {
				Collections.sort(list);
				names.addAll(list);
			}
			return names.toArray(new String[0]);
		}
		finally {
			lock.release();
		}
	}
Database implementation for the enumerated data type.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/EnumDB.java