2.2. The Division and Conference Classes

The Division and Conference classes are classes that represent enumerated types for the divisions and conferences within the NFL. These classes define numeric constants that will be used to represent the divisions and conferences, and map those constants to the corresponding names. The data is static; although there are occasional changes (such as the realignment occurring in 2002), these changes are infrequent enough that they can be handled by changing the code. (Note that a better way of implementing enumerated types will be shown when we rework these two classes in Chapter 3). Listing 2.1 shows the Division class; the Conference class is implemented in a very similar way. (Full listings of these and ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.