public T getEnumValue(Settings settings, T defaultValueOverride) {
		Long lvalue = settings.getLong(settingName);
		if (lvalue == null) {
			return defaultValueOverride;
		}

		int valueOrdinal = (int) (long) lvalue;
		return (0 <= valueOrdinal && valueOrdinal < values.length) ? values[valueOrdinal]
				: defaultValueOverride;
	}
Returns an enum instance that corresponds to the setting stored, or the
a custom default value if the setting has not been assigned yet.

@param settings {@link Settings} object that stores the settings values.
@return Enum&lt;T&gt; value, or the specified defaultValueOveride if not present.
Ghidra/Framework/Docking/src/main/java/ghidra/docking/settings/JavaEnumSettingsDefinition.java