tswift242 / fantasyfootball-custom-scorer

Fantasy Football program for quickly determining good custom scoring rules for custom leagues
MIT License
0 stars 0 forks source link

Move categoriesToString() from Player subclasses to Mode #14

Closed tswift242 closed 10 years ago

tswift242 commented 10 years ago

Make each Mode enum implement categoriesToString() instead of each Player subclass (gives static access to this information). Will need to pass Mode into PlayersPanel constructor from ScorerPanel.

tswift242 commented 10 years ago

Can either hardcode categoriesToString() implementation for each Mode, or can write one generic method which uses reflection through statTypes instance variable.

Should save the output of this function to a field; this is constant and should only need to be calculated once.

EDIT: Write single generic method without reflection by using EnumUtils.valuesToString(), and then remove each valuesToString() in enum classes.