r/java • u/davidalayachew • Jul 16 '26
Identifying JDK value class candidates
https://mail.openjdk.org/archives/list/core-libs-dev@openjdk.org/thread/Y72NRXM7KYBX43OKYBQMVKOZDWKG4MHS/
52
Upvotes
View all comments
Show parent comment
1
u/aoeudhtns Jul 16 '26
Enums do have an interesting property of being representable as
intviaordinal(), so if you needed that it wouldn't be too much effort to do that and resolve them back withType.values()[ordinal].