p
enumeratum
package enumeratum
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
-
trait
Enum
[A <: EnumEntry] extends AnyRef
All the cool kids have their own Enumeration implementation, most of which try to do so in the name of implementing exhaustive pattern matching.
All the cool kids have their own Enumeration implementation, most of which try to do so in the name of implementing exhaustive pattern matching.
This is yet another one.
How to use:
sealed trait DummyEnum extends EnumEntry object DummyEnum extends Enum[DummyEnum] { val values = findValues case object Hello extends DummyEnum case object GoodBye extends DummyEnum case object Hi extends DummyEnum } DummyEnum.values should be(Set(Hello, GoodBye, Hi)) DummyEnum.withName("Hello") should be(Hello)
- A
The sealed trait
-
abstract
class
EnumEntry
extends AnyRef
Base type for an enum entry for Enum