Packages

sealed class Guid[+A] extends Ordered[Guid[_]] with Serializable

Tries to be a space/cpu efficient and type safe replacement for java's UUID.

This class takes a single (although unused) type parameter. This is to implemnet compile-time checks while still keeping the json integration simple (only need to define (de)serialization in one place)

E.g.

val orderGuid: Guid[Order] = ...
val userGuid: Guid[User] = ...
Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, Ordered[Guid[_]], Comparable[Guid[_]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Guid
  2. Serializable
  3. Serializable
  4. Ordered
  5. Comparable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Guid(uuid: UUID)
  2. new Guid(uuid: String)
  3. new Guid(mostSignificantBits: Long, leastSignificantBits: Long)
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <(that: Guid[_]): Boolean
    Definition Classes
    Ordered
  4. def <=(that: Guid[_]): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: Guid[_]): Boolean
    Definition Classes
    Ordered
  7. def >=(that: Guid[_]): Boolean
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def compare(other: Guid[_]): Int
    Definition Classes
    Guid → Ordered
  11. def compareTo(that: Guid[_]): Int
    Definition Classes
    Ordered → Comparable
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def equals(obj: Any): Boolean
    Definition Classes
    Guid → AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  16. def getLeastSignificantBits(): Long
  17. def getMostSignificantBits(): Long
  18. final val hashCode: Int
    Definition Classes
    Guid → AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. val leastSignificantBits: Long
  21. val mostSignificantBits: Long
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. final def toBytes: Array[Byte]
  27. final def toString(): String

    Optimized version (should generate much less garbage than UUID).

    Optimized version (should generate much less garbage than UUID).

    returns

    should produce same result as UUID.

    Definition Classes
    Guid → AnyRef → Any
  28. final def toUUID: UUID
  29. final def typeCast[B]: Guid[B]

    Safe way to cast an Guid of marker type A to Guid of marker type B.

    Safe way to cast an Guid of marker type A to Guid of marker type B.

    This should only be used to convert between Guids with equivalent marker types (i.e. Guid[com.foo.User] -> Guid[org.bar.User]).

    It should _not_ be used to convert between Guids with unrelated marker types, like User -> Order.

    B

    The target marker type

    returns

    a new Guid

  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Ordered[Guid[_]]

Inherited from Comparable[Guid[_]]

Inherited from AnyRef

Inherited from Any

Ungrouped