Quantcast
Channel: Search Results For: domain:blog.pengyifan.com
Viewing all articles
Browse latest Browse all 27

How to extend enum in Java

$
0
0

In Java feature, it is not possible to have one enum extend another. But occasionally, you may still want to make an enum class extensible. The solution we came up with was to use an enum and a name-based lookup. Both will be done by implementing a mixin interface.


Viewing all articles
Browse latest Browse all 27

Trending Articles