How can I eliminate duplicated Enum code?

后端 未结 15 831
眼角桃花
眼角桃花 2020-12-24 13:40

I have a large number of Enums that implement this interface:

/**
 * Interface for an enumeration, each element of which can be uniquely identified by its co         


        
15条回答
  •  隐瞒了意图╮
    2020-12-24 13:54

    If you really want inheritance, don't forget that you can implement the enum pattern yourself, like in the bad old Java 1.4 days.

提交回复
热议问题