LongEnum

enumeratum.values.LongEnum
See theLongEnum companion object
trait LongEnum[A <: LongEnumEntry] extends ValueEnum[Long, A]

Value enum with LongEnumEntry entries

Attributes

Companion:
object
Graph
Supertypes
trait ValueEnum[Long, A]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

inline protected def findValues: IndexedSeq[A]

Returns a Seq of A objects that the macro was able to find.

Returns a Seq of A objects that the macro was able to find.

You will want to use this in some way to implement your values method. In fact, if you aren't using this method...why are you even bothering with this lib?

Attributes

Inherited from:
LongEnumCompat (hidden)
def values: IndexedSeq[EntryType]

The sequence of values for your Enum. You will typically want to implement this in your extending class as a val so that withValue and friends are as efficient as possible.

The sequence of values for your Enum. You will typically want to implement this in your extending class as a val so that withValue and friends are as efficient as possible.

Feel free to implement this however you'd like (including messing around with ordering, etc) if that fits your needs better.

Attributes

Inherited from:
ValueEnum
def withValue(i: Long): EntryType

Tries to get an EntryType by the supplied value. The value corresponds to the .value of the case objects implementing EntryType

Tries to get an EntryType by the supplied value. The value corresponds to the .value of the case objects implementing EntryType

Like Enumeration 's withValue, this method will throw if the value does not match any of the values' .value values.

Attributes

Inherited from:
ValueEnum
def withValueEither(i: Long): Either[NoSuchMember[ValueType, ValueEnumEntry[ValueType]], EntryType]

Returns an [[Right[EntryType]] ] for a given value, or a [[Left[NoSuchMember]] ] if the value does not match any of the values' .value values.

Returns an [[Right[EntryType]] ] for a given value, or a [[Left[NoSuchMember]] ] if the value does not match any of the values' .value values.

Attributes

Inherited from:
ValueEnum
def withValueOpt(i: Long): Option[EntryType]

Optionally returns an EntryType for a given value.

Optionally returns an EntryType for a given value.

Attributes

Inherited from:
ValueEnum

Inherited fields

final lazy val valuesToEntriesMap: Map[Long, A]

Map of ValueType to EntryType members

Map of ValueType to EntryType members

Attributes

Inherited from:
ValueEnum