Breaking up a large Java enum

前端 未结 4 2067
时光取名叫无心
时光取名叫无心 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:43

    I would use an interface which these instances all share, then you can use any number of enums or load them from another data source such as a file or database.

提交回复
热议问题