Trait/Object

fm.common

UUIDWrapper

Related Docs: object UUIDWrapper | package common

Permalink

trait UUIDWrapper[T <: UUIDWrapper[T]] extends Ordered[T]

An UUID wrapper class that allow you to define custom types that represent an UUID.

The intended usage pattern is something like:

object UserId extends UUIDFactory[UserId](new UserId(_))
final class UserId(val uuid: UUID) extends UUIDWrapper[UserId]

This allows you to then reference UserId instead of UUID and to have methods that take a strongly typed UserId instead of an UUID (which could represent something other than a User id)

Note: The class that extends this should also extends AnyVal so that serialization will just pass through to the underlying uuid

Linear Supertypes
Ordered[T], Comparable[T], Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UUIDWrapper
  2. Ordered
  3. Comparable
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getClass(): Class[_]

    Permalink
    Definition Classes
    Any
  2. abstract def uuid: UUID

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. def <(that: T): Boolean

    Permalink
    Definition Classes
    Ordered
  4. def <=(that: T): Boolean

    Permalink
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  6. def >(that: T): Boolean

    Permalink
    Definition Classes
    Ordered
  7. def >=(that: T): Boolean

    Permalink
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. final def compare(that: T): Int

    Permalink
    Definition Classes
    UUIDWrapper → Ordered
  10. def compareTo(that: T): Int

    Permalink
    Definition Classes
    Ordered → Comparable
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def toString(): String

    Permalink
    Definition Classes
    UUIDWrapper → Any

Inherited from Ordered[T]

Inherited from Comparable[T]

Inherited from Any

Ungrouped