Imagine this trivial, completely made up scenario:
interface MediaType {}
enum BookTypes implements MediaType {
HARDCOVER;
}
enum MagazineTypes implements MediaType {
MONTHLY;
}
Map<MediaType, MediaItem> itemMap = new HashMap<MediaType, MediaItem>();
itemMap.put(BookTypes.HARDCOVER, new Book());
itemMap.put(MagazineTypes.MONTHLY, new Magazine());
I think it's pretty clear why you wouldn't want to use ordinal as a hash code in this instance.