This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I was going to implement the fields length as final variables of the data class, but since we have enum types I thought it would be better to use it, but going over the header description I found that the field's length is defined there, and now I would like to define those values dynamically when the file is loaded the first time, but I also would like to encapsulate those values on an enum type, but I do not know how to call the enum constructor using a variable reference (I think is not possible). In summary my question is should I create a class to handle those variables and set their values dynamically or create an enum type inside the data class?