Convert reference types to enums

Issue #13 new
IJabz repo owner created an issue

From https://java.net/jira/browse/JAUDIOTAGGER-272

Classes such as GenreTypes,PictureTypes and Languages all subclass AbstractValuePair which is simply a class that keeps a two way mapping between id and value, it not really a supertype of these classes. This code was all written before Java 1.5 and would be much better served by using enums instead which does much of the work for you, for one thing all items would be referenable individally e.g PictureType.COVER_FRONT and PictureType.COVER_BACK which you cant do at the moment, could also remove intermediate stage when reading writing these fields to body which is currently controlled by big switch stmt in classes such as NumberHashMap.

Comments (0)

  1. Log in to comment