Usage of a Custom Ordinal in Enum February 23, 2018 The getCustomValue() method on the enum returns the custom value associated. You can use this mechanism when you want to override the default ordinal with a custom ordinal. Code snippet public