All Articles

enums II

Imagine:

public enum Days {
    MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY,SUNDAY;
}

Then is it: Days day = MONDAY; or is it: Days days = MONDAY; How about a set of days? Would you call it days? Is it a set of days or a set of dayss? It can get worse: DaysEnum or DayEnums? Don’t call your day days… To be fair such atrocities already exist in jdk, like LayoutFlags or CssFlags (these particular ones thankfully in the bowels of com.sun.javafx). Not one of their best moments.