For Scala, take a look at the enumeratum library (https://github.com/lloydmeta/enumeratum). In my viewpoint, its the very best enum execution I understand of. It has all the functions specified in the table, and even supports compile-time recognition of distinct associated secrets (eg. String/Int secrets).
eg.
import enumeratum.values. _.
sealed abstract class LibraryItem( val worth: Int, val name: String) extends IntEnumEntry.
things LibraryItem extends IntEnum[LibraryItem] {
case things Book extends LibraryItem( worth = 1, name="book").
case things Film extends LibraryItem( name="film", worth = 2).
case things Publication extends LibraryItem( 3, "publication").
case things CD extends LibraryItem( 4, name="cd").
// case things Paper extends LibraryItem( 4, name="paper") <