Breaking up a large Java enum

前端 未结 4 2049
时光取名叫无心
时光取名叫无心 2020-12-18 06:42

What is the recommended practice for taking a Java enum that has say 1300 values and putting it into organized groups? I know you can\'t just extends the enum group, so are

4条回答
  •  甜味超标
    2020-12-18 07:25

    From an oops perspective it would be a good idea to break them into cohesive units. So if I were you, I would evaluate which of these enums have a cohesion towards a responsibility.

提交回复
热议问题