trait EnumApi[E] extends AnyRef
The API exposed by enumerations created with the @enum macro. Unlike Scala's Enumeration interface, all auto-generated functions are protected so the user can choose which functions to expose on their type.
- E
The type of the enumeration.
- Alphabetic
- By Inheritance
- EnumApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
asIntImpl(enum: E): Int
Returns an Int representation of the enum.
Returns an Int representation of the enum. The first listed case is 1, the second 2, and so on.
- Attributes
- protected
-
abstract
def
asStringImpl(enum: E): String
Returns a string representation of the enum.
Returns a string representation of the enum.
- Attributes
- protected
-
abstract
def
className: String
Provides the class name of the enumeration.
Provides the class name of the enumeration. This is useful for traits that build on top of
EnumApi
.- Attributes
- protected
-
abstract
def
firstImpl: E
The first case defined in the enum.
The first case defined in the enum.
- Attributes
- protected
-
abstract
def
fromIntImpl(int: Int): Option[E]
Returns the case whose Int representation matches, if there is one.
Returns the case whose Int representation matches, if there is one.
- Attributes
- protected
-
abstract
def
fromStringImpl(str: String): Option[E]
Returns the case whose String representation matches, if there is one.
Returns the case whose String representation matches, if there is one.
- Attributes
- protected
-
abstract
def
lastImpl: E
The last case defined in the enum.
The last case defined in the enum.
- Attributes
- protected
-
abstract
def
valuesImpl: Set[E]
The full set of enumeration values.
The full set of enumeration values.
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asLongImpl(enum: E): Long
Returns a Long representation of the enum.
Returns a Long representation of the enum. The first listed case is 1, the second 2, and so on.
- Attributes
- protected
-
def
asShortImpl(enum: E): Short
Returns a Short representation of the enum.
Returns a Short representation of the enum. The first listed case is 1, the second 2, and so on.
- Attributes
- protected
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromLongImpl(long: Long): Option[E]
Returns the case whose Long representation matches, if there is one.
Returns the case whose Long representation matches, if there is one.
- Attributes
- protected
-
def
fromShortImpl(short: Short): Option[E]
Returns the case whose Short representation matches, if there is one.
Returns the case whose Short representation matches, if there is one.
- Attributes
- protected
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextImpl(enum: E): Option[E]
Returns the case defined just after the given enum, if one exists.
Returns the case defined just after the given enum, if one exists.
- Attributes
- protected
-
def
nextModImpl(enum: E): E
As
nextImpl
but modular: the last defined case wraps around to the first one.As
nextImpl
but modular: the last defined case wraps around to the first one.- Attributes
- protected
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
orderingImpl: Ordering[E]
An instance of
Ordering
based on the definition order of the cases.An instance of
Ordering
based on the definition order of the cases.- Attributes
- protected
-
def
prevImpl(enum: E): Option[E]
Returns the case defined just before the given enum, if one exists.
Returns the case defined just before the given enum, if one exists.
- Attributes
- protected
-
def
prevModImpl(enum: E): E
As
prevImpl
but modular: the first defined case wraps around to the last one.As
prevImpl
but modular: the first defined case wraps around to the last one.- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )