Packages

t

macrame

EnumApi

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EnumApi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. 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
  2. abstract def asStringImpl(enum: E): String

    Returns a string representation of the enum.

    Returns a string representation of the enum.

    Attributes
    protected
  3. 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
  4. abstract def firstImpl: E

    The first case defined in the enum.

    The first case defined in the enum.

    Attributes
    protected
  5. 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
  6. 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
  7. abstract def lastImpl: E

    The last case defined in the enum.

    The last case defined in the enum.

    Attributes
    protected
  8. abstract def valuesImpl: Set[E]

    The full set of enumeration values.

    The full set of enumeration values.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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
  6. 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
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. 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
  12. 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
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. 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
  18. 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
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. 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
  22. 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
  23. 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
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped