trait OrderedModular[E] extends Ordered[E]
This traits provides the same interface as Ordered
as well as the modular
ordering functions. As with that trait it works by extending the companion
object of the enumeration class.
@enum class Color { Red Blue Yellow } object Color extends OrderedModular[Color]
This enables the following functions.
Red.prevMod Color.prevMod(Red) // Yellow Yellow.nextMod Color.nextMod(Yellow) // Red
- Self Type
- OrderedModular[E] with EnumApi[E]
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- OrderedModular
- Ordered
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- implicit class OrderedOps extends AnyRef
- Definition Classes
- Ordered
- implicit class OrderedModularOps extends AnyRef
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 clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def first: E
- Definition Classes
- Ordered
- Annotations
- @inline()
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def last: E
- Definition Classes
- Ordered
- Annotations
- @inline()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next(enum: E): Option[E]
- Definition Classes
- Ordered
- Annotations
- @inline()
- def nextMod(enum: E): E
- Annotations
- @inline()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val ordering: Ordering[E]
- Definition Classes
- Ordered
- Annotations
- @inline()
- def prev(enum: E): Option[E]
- Definition Classes
- Ordered
- Annotations
- @inline()
- def prevMod(enum: E): E
- Annotations
- @inline()
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()